diff --git a/Makefile b/Makefile index c0b9d70a3..229b23d17 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -ARGO_WORKFLOWS_VERSION="3.5.5" +ARGO_WORKFLOWS_VERSION="3.6.2" OPENAPI_SPEC_URL="https://raw.githubusercontent.com/argoproj/argo-workflows/v$(ARGO_WORKFLOWS_VERSION)/api/openapi-spec/swagger.json" SPEC_PATH="$(shell pwd)/argo-workflows-$(ARGO_WORKFLOWS_VERSION).json" diff --git a/docs/examples/workflows-examples.md b/docs/examples/workflows-examples.md index 186aff102..996449e12 100644 --- a/docs/examples/workflows-examples.md +++ b/docs/examples/workflows-examples.md @@ -32,8 +32,6 @@ Explore the examples through the side bar! | [conditionals-complex](https://github.com/argoproj/argo-workflows/blob/main/examples/conditionals-complex.yaml) | | [configmaps/simple-parameters-configmap](https://github.com/argoproj/argo-workflows/blob/main/examples/configmaps/simple-parameters-configmap.yaml) | | [cron-backfill](https://github.com/argoproj/argo-workflows/blob/main/examples/cron-backfill.yaml) | -| [cron-when](https://github.com/argoproj/argo-workflows/blob/main/examples/cron-when.yaml) | -| [cron-workflow-multiple-schedules](https://github.com/argoproj/argo-workflows/blob/main/examples/cron-workflow-multiple-schedules.yaml) | | [daemon-step](https://github.com/argoproj/argo-workflows/blob/main/examples/daemon-step.yaml) | | [daemoned-stateful-set-with-service](https://github.com/argoproj/argo-workflows/blob/main/examples/daemoned-stateful-set-with-service.yaml) | | [dag-coinflip](https://github.com/argoproj/argo-workflows/blob/main/examples/dag-coinflip.yaml) | diff --git a/docs/examples/workflows/misc/cron_workflow_stop_strategy.md b/docs/examples/workflows/misc/cron_workflow_stop_strategy.md new file mode 100644 index 000000000..ba8aebfad --- /dev/null +++ b/docs/examples/workflows/misc/cron_workflow_stop_strategy.md @@ -0,0 +1,67 @@ +# Cron Workflow Stop Strategy + + + + + + +=== "Hera" + + ```python linenums="1" + from hera.workflows import Container, CronWorkflow + from hera.workflows.models import StopStrategy + + with CronWorkflow( + name="hello-world-multiple-schedules", + entrypoint="whalesay", + schedules=[ + "*/3 * * * *", + "*/2 * * * *", + ], + stop_strategy=StopStrategy(expression="cronworkflow.failed >= 3"), + timezone="America/Los_Angeles", + starting_deadline_seconds=0, + concurrency_policy="Replace", + successful_jobs_history_limit=4, + failed_jobs_history_limit=4, + cron_suspend=False, + ) as w: + Container( + name="whalesay", + image="docker/whalesay:latest", + command=["cowsay"], + args=["🕓 hello world. Scheduled on: {{workflow.scheduledTime}}"], + ) + ``` + +=== "YAML" + + ```yaml linenums="1" + apiVersion: argoproj.io/v1alpha1 + kind: CronWorkflow + metadata: + name: hello-world-multiple-schedules + spec: + concurrencyPolicy: Replace + failedJobsHistoryLimit: 4 + schedules: + - '*/3 * * * *' + - '*/2 * * * *' + startingDeadlineSeconds: 0 + stopStrategy: + expression: cronworkflow.failed >= 3 + successfulJobsHistoryLimit: 4 + suspend: false + timezone: America/Los_Angeles + workflowSpec: + entrypoint: whalesay + templates: + - container: + args: + - "\U0001F553 hello world. Scheduled on: {{workflow.scheduledTime}}" + command: + - cowsay + image: docker/whalesay:latest + name: whalesay + ``` + diff --git a/docs/examples/workflows/misc/user_container.md b/docs/examples/workflows/misc/user_container.md index e2af4bfa2..d7d3d440a 100644 --- a/docs/examples/workflows/misc/user_container.md +++ b/docs/examples/workflows/misc/user_container.md @@ -34,7 +34,7 @@ This example showcases the user of a user container with a volume mount. metadata=m.ObjectMeta(name="something"), spec=m.PersistentVolumeClaimSpec( access_modes=["ReadWriteOnce"], - resources=m.ResourceRequirements(requests={"storage": "64Mi"}), + resources=m.VolumeResourceRequirements(requests={"storage": "64Mi"}), ), ) ], diff --git a/docs/examples/workflows/upstream/ci_output_artifact.md b/docs/examples/workflows/upstream/ci_output_artifact.md index 688168c89..5c4ff9348 100644 --- a/docs/examples/workflows/upstream/ci_output_artifact.md +++ b/docs/examples/workflows/upstream/ci_output_artifact.md @@ -30,7 +30,7 @@ The upstream example can be [found here](https://github.com/argoproj/argo-workfl metadata=m.ObjectMeta(name="workdir"), spec=m.PersistentVolumeClaimSpec( access_modes=["ReadWriteOnce"], - resources=m.ResourceRequirements( + resources=m.VolumeResourceRequirements( requests={ "storage": m.Quantity(__root__="1Gi"), } diff --git a/docs/examples/workflows/upstream/ci_workflowtemplate.md b/docs/examples/workflows/upstream/ci_workflowtemplate.md index bfe2f6ec0..76a3d507f 100644 --- a/docs/examples/workflows/upstream/ci_workflowtemplate.md +++ b/docs/examples/workflows/upstream/ci_workflowtemplate.md @@ -34,7 +34,7 @@ The upstream example can be [found here](https://github.com/argoproj/argo-workfl metadata=m.ObjectMeta(name="work"), spec=m.PersistentVolumeClaimSpec( access_modes=["ReadWriteOnce"], - resources=m.ResourceRequirements( + resources=m.VolumeResourceRequirements( requests={ "storage": m.Quantity(__root__="64Mi"), } diff --git a/docs/examples/workflows/upstream/cron_when.md b/docs/examples/workflows/upstream/cron_when.md new file mode 100644 index 000000000..0698e164d --- /dev/null +++ b/docs/examples/workflows/upstream/cron_when.md @@ -0,0 +1,54 @@ +# Cron When + +## Note + +This example is a replication of an Argo Workflow example in Hera. +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/cron-when.yaml). + + + + +=== "Hera" + + ```python linenums="1" + from hera.workflows import Container, CronWorkflow + + with CronWorkflow( + name="sleep-when", + entrypoint="sleep-busybox", + schedule="* * * * *", + concurrency_policy="Allow", + when="{{= cronworkflow.lastScheduledTime == nil || (now() - cronworkflow.lastScheduledTime).Seconds() > 360 }}", + ) as w: + print_message = Container( + name="sleep-busybox", + image="busybox", + command=["sleep"], + args=["10"], + ) + ``` + +=== "YAML" + + ```yaml linenums="1" + apiVersion: argoproj.io/v1alpha1 + kind: CronWorkflow + metadata: + name: sleep-when + spec: + concurrencyPolicy: Allow + schedule: '* * * * *' + when: '{{= cronworkflow.lastScheduledTime == nil || (now() - cronworkflow.lastScheduledTime).Seconds() + > 360 }}' + workflowSpec: + entrypoint: sleep-busybox + templates: + - container: + args: + - '10' + command: + - sleep + image: busybox + name: sleep-busybox + ``` + diff --git a/docs/examples/workflows/upstream/cron_workflow_multiple_schedules.md b/docs/examples/workflows/upstream/cron_workflow_multiple_schedules.md new file mode 100644 index 000000000..f4e057637 --- /dev/null +++ b/docs/examples/workflows/upstream/cron_workflow_multiple_schedules.md @@ -0,0 +1,66 @@ +# Cron Workflow Multiple Schedules + +## Note + +This example is a replication of an Argo Workflow example in Hera. +The upstream example can be [found here](https://github.com/argoproj/argo-workflows/blob/main/examples/cron-workflow-multiple-schedules.yaml). + + + + +=== "Hera" + + ```python linenums="1" + from hera.workflows import Container, CronWorkflow + + with CronWorkflow( + name="hello-world-multiple-schedules", + entrypoint="whalesay", + schedules=[ + "*/3 * * * *", + "*/2 * * * *", + ], + timezone="America/Los_Angeles", + starting_deadline_seconds=0, + concurrency_policy="Replace", + successful_jobs_history_limit=4, + failed_jobs_history_limit=4, + cron_suspend=False, + ) as w: + Container( + name="whalesay", + image="docker/whalesay:latest", + command=["cowsay"], + args=["🕓 hello world. Scheduled on: {{workflow.scheduledTime}}"], + ) + ``` + +=== "YAML" + + ```yaml linenums="1" + apiVersion: argoproj.io/v1alpha1 + kind: CronWorkflow + metadata: + name: hello-world-multiple-schedules + spec: + concurrencyPolicy: Replace + failedJobsHistoryLimit: 4 + schedules: + - '*/3 * * * *' + - '*/2 * * * *' + startingDeadlineSeconds: 0 + successfulJobsHistoryLimit: 4 + suspend: false + timezone: America/Los_Angeles + workflowSpec: + entrypoint: whalesay + templates: + - container: + args: + - "\U0001F553 hello world. Scheduled on: {{workflow.scheduledTime}}" + command: + - cowsay + image: docker/whalesay:latest + name: whalesay + ``` + diff --git a/docs/examples/workflows/use-cases/fine_tune_llama.md b/docs/examples/workflows/use-cases/fine_tune_llama.md index 4e3397302..38403a2fb 100644 --- a/docs/examples/workflows/use-cases/fine_tune_llama.md +++ b/docs/examples/workflows/use-cases/fine_tune_llama.md @@ -260,7 +260,7 @@ There are several implicit dependencies in this script: m.PersistentVolumeClaim( metadata=m.ObjectMeta(name=f"rank-{i}"), spec=m.PersistentVolumeClaimSpec( - resources=m.ResourceRequirements(requests={"storage": "20Gi"}, limits={"storage": "20Gi"}), + resources=m.VolumeResourceRequirements(requests={"storage": "20Gi"}, limits={"storage": "20Gi"}), # TODO: it's possible to spin up pods in one zone of a region and a disk in another zone of a region! # I recommend setting a `storage_class_name` that specifically tells K8s that it should create # the volumes only when pods actually want to _mount_ a volume! That way the disks are diff --git a/examples/workflows/misc/cron-workflow-stop-strategy.yaml b/examples/workflows/misc/cron-workflow-stop-strategy.yaml new file mode 100644 index 000000000..d12596e3e --- /dev/null +++ b/examples/workflows/misc/cron-workflow-stop-strategy.yaml @@ -0,0 +1,26 @@ +apiVersion: argoproj.io/v1alpha1 +kind: CronWorkflow +metadata: + name: hello-world-multiple-schedules +spec: + concurrencyPolicy: Replace + failedJobsHistoryLimit: 4 + schedules: + - '*/3 * * * *' + - '*/2 * * * *' + startingDeadlineSeconds: 0 + stopStrategy: + expression: cronworkflow.failed >= 3 + successfulJobsHistoryLimit: 4 + suspend: false + timezone: America/Los_Angeles + workflowSpec: + entrypoint: whalesay + templates: + - container: + args: + - "\U0001F553 hello world. Scheduled on: {{workflow.scheduledTime}}" + command: + - cowsay + image: docker/whalesay:latest + name: whalesay diff --git a/examples/workflows/misc/cron_workflow_stop_strategy.py b/examples/workflows/misc/cron_workflow_stop_strategy.py new file mode 100644 index 000000000..643f74870 --- /dev/null +++ b/examples/workflows/misc/cron_workflow_stop_strategy.py @@ -0,0 +1,24 @@ +from hera.workflows import Container, CronWorkflow +from hera.workflows.models import StopStrategy + +with CronWorkflow( + name="hello-world-multiple-schedules", + entrypoint="whalesay", + schedules=[ + "*/3 * * * *", + "*/2 * * * *", + ], + stop_strategy=StopStrategy(expression="cronworkflow.failed >= 3"), + timezone="America/Los_Angeles", + starting_deadline_seconds=0, + concurrency_policy="Replace", + successful_jobs_history_limit=4, + failed_jobs_history_limit=4, + cron_suspend=False, +) as w: + Container( + name="whalesay", + image="docker/whalesay:latest", + command=["cowsay"], + args=["🕓 hello world. Scheduled on: {{workflow.scheduledTime}}"], + ) diff --git a/examples/workflows/misc/user_container.py b/examples/workflows/misc/user_container.py index c587ad9ab..f40669638 100644 --- a/examples/workflows/misc/user_container.py +++ b/examples/workflows/misc/user_container.py @@ -26,7 +26,7 @@ def foo(): metadata=m.ObjectMeta(name="something"), spec=m.PersistentVolumeClaimSpec( access_modes=["ReadWriteOnce"], - resources=m.ResourceRequirements(requests={"storage": "64Mi"}), + resources=m.VolumeResourceRequirements(requests={"storage": "64Mi"}), ), ) ], diff --git a/examples/workflows/upstream/ci_output_artifact.py b/examples/workflows/upstream/ci_output_artifact.py index 0310e506f..73db27b7e 100644 --- a/examples/workflows/upstream/ci_output_artifact.py +++ b/examples/workflows/upstream/ci_output_artifact.py @@ -17,7 +17,7 @@ metadata=m.ObjectMeta(name="workdir"), spec=m.PersistentVolumeClaimSpec( access_modes=["ReadWriteOnce"], - resources=m.ResourceRequirements( + resources=m.VolumeResourceRequirements( requests={ "storage": m.Quantity(__root__="1Gi"), } diff --git a/examples/workflows/upstream/ci_workflowtemplate.py b/examples/workflows/upstream/ci_workflowtemplate.py index 2a8a904a1..703d5f662 100644 --- a/examples/workflows/upstream/ci_workflowtemplate.py +++ b/examples/workflows/upstream/ci_workflowtemplate.py @@ -21,7 +21,7 @@ metadata=m.ObjectMeta(name="work"), spec=m.PersistentVolumeClaimSpec( access_modes=["ReadWriteOnce"], - resources=m.ResourceRequirements( + resources=m.VolumeResourceRequirements( requests={ "storage": m.Quantity(__root__="64Mi"), } diff --git a/examples/workflows/upstream/container-set-template--parallel-workflow.upstream.yaml b/examples/workflows/upstream/container-set-template--parallel-workflow.upstream.yaml index 62722d25e..df1f125ab 100644 --- a/examples/workflows/upstream/container-set-template--parallel-workflow.upstream.yaml +++ b/examples/workflows/upstream/container-set-template--parallel-workflow.upstream.yaml @@ -6,7 +6,7 @@ metadata: workflows.argoproj.io/test: "true" annotations: workflows.argoproj.io/description: | - This workflow demonstrates running a parallel containers within a single pod. + This workflow demonstrates running parallel containers within a single pod. workflows.argoproj.io/version: ">= 3.1.0" spec: entrypoint: main diff --git a/examples/workflows/upstream/container-set-template__parallel-workflow.upstream.yaml b/examples/workflows/upstream/container-set-template__parallel-workflow.upstream.yaml index 62722d25e..df1f125ab 100644 --- a/examples/workflows/upstream/container-set-template__parallel-workflow.upstream.yaml +++ b/examples/workflows/upstream/container-set-template__parallel-workflow.upstream.yaml @@ -6,7 +6,7 @@ metadata: workflows.argoproj.io/test: "true" annotations: workflows.argoproj.io/description: | - This workflow demonstrates running a parallel containers within a single pod. + This workflow demonstrates running parallel containers within a single pod. workflows.argoproj.io/version: ">= 3.1.0" spec: entrypoint: main diff --git a/examples/workflows/upstream/cron-when.yaml b/examples/workflows/upstream/cron-when.yaml new file mode 100644 index 000000000..28a9f9b6c --- /dev/null +++ b/examples/workflows/upstream/cron-when.yaml @@ -0,0 +1,19 @@ +apiVersion: argoproj.io/v1alpha1 +kind: CronWorkflow +metadata: + name: sleep-when +spec: + concurrencyPolicy: Allow + schedule: '* * * * *' + when: '{{= cronworkflow.lastScheduledTime == nil || (now() - cronworkflow.lastScheduledTime).Seconds() + > 360 }}' + workflowSpec: + entrypoint: sleep-busybox + templates: + - container: + args: + - '10' + command: + - sleep + image: busybox + name: sleep-busybox diff --git a/examples/workflows/upstream/cron-workflow-multiple-schedules.yaml b/examples/workflows/upstream/cron-workflow-multiple-schedules.yaml new file mode 100644 index 000000000..ca66b4f14 --- /dev/null +++ b/examples/workflows/upstream/cron-workflow-multiple-schedules.yaml @@ -0,0 +1,24 @@ +apiVersion: argoproj.io/v1alpha1 +kind: CronWorkflow +metadata: + name: hello-world-multiple-schedules +spec: + concurrencyPolicy: Replace + failedJobsHistoryLimit: 4 + schedules: + - '*/3 * * * *' + - '*/2 * * * *' + startingDeadlineSeconds: 0 + successfulJobsHistoryLimit: 4 + suspend: false + timezone: America/Los_Angeles + workflowSpec: + entrypoint: whalesay + templates: + - container: + args: + - "\U0001F553 hello world. Scheduled on: {{workflow.scheduledTime}}" + command: + - cowsay + image: docker/whalesay:latest + name: whalesay diff --git a/examples/workflows/upstream/cron_when.py b/examples/workflows/upstream/cron_when.py new file mode 100644 index 000000000..f51fbf30c --- /dev/null +++ b/examples/workflows/upstream/cron_when.py @@ -0,0 +1,15 @@ +from hera.workflows import Container, CronWorkflow + +with CronWorkflow( + name="sleep-when", + entrypoint="sleep-busybox", + schedule="* * * * *", + concurrency_policy="Allow", + when="{{= cronworkflow.lastScheduledTime == nil || (now() - cronworkflow.lastScheduledTime).Seconds() > 360 }}", +) as w: + print_message = Container( + name="sleep-busybox", + image="busybox", + command=["sleep"], + args=["10"], + ) diff --git a/examples/workflows/upstream/cron_workflow_multiple_schedules.py b/examples/workflows/upstream/cron_workflow_multiple_schedules.py new file mode 100644 index 000000000..22f7b0d1c --- /dev/null +++ b/examples/workflows/upstream/cron_workflow_multiple_schedules.py @@ -0,0 +1,22 @@ +from hera.workflows import Container, CronWorkflow + +with CronWorkflow( + name="hello-world-multiple-schedules", + entrypoint="whalesay", + schedules=[ + "*/3 * * * *", + "*/2 * * * *", + ], + timezone="America/Los_Angeles", + starting_deadline_seconds=0, + concurrency_policy="Replace", + successful_jobs_history_limit=4, + failed_jobs_history_limit=4, + cron_suspend=False, +) as w: + Container( + name="whalesay", + image="docker/whalesay:latest", + command=["cowsay"], + args=["🕓 hello world. Scheduled on: {{workflow.scheduledTime}}"], + ) diff --git a/examples/workflows/use_cases/fine_tune_llama.py b/examples/workflows/use_cases/fine_tune_llama.py index 16185ac47..fc043cf85 100644 --- a/examples/workflows/use_cases/fine_tune_llama.py +++ b/examples/workflows/use_cases/fine_tune_llama.py @@ -253,7 +253,7 @@ m.PersistentVolumeClaim( metadata=m.ObjectMeta(name=f"rank-{i}"), spec=m.PersistentVolumeClaimSpec( - resources=m.ResourceRequirements(requests={"storage": "20Gi"}, limits={"storage": "20Gi"}), + resources=m.VolumeResourceRequirements(requests={"storage": "20Gi"}, limits={"storage": "20Gi"}), # TODO: it's possible to spin up pods in one zone of a region and a disk in another zone of a region! # I recommend setting a `storage_class_name` that specifically tells K8s that it should create # the volumes only when pods actually want to _mount_ a volume! That way the disks are diff --git a/scripts/models.py b/scripts/models.py index 1145213e9..650f1fa98 100644 --- a/scripts/models.py +++ b/scripts/models.py @@ -142,15 +142,6 @@ def write_imports(references: List[ImportReference], models_type: str, openapi_s enums = [ "ImagePullPolicy", - "TerminationMessagePolicy", - "Protocol", - "Scheme", - "Operator", - "Type", - "Phase", - "TypeModel", - "Effect", - "OperatorModel", ] for enum in enums: references.append(ImportReference(f"hera.{models_type}.models.io.k8s.api.core.v1", enum)) diff --git a/scripts/spec.py b/scripts/spec.py index 711c9862a..a4defd098 100755 --- a/scripts/spec.py +++ b/scripts/spec.py @@ -70,12 +70,6 @@ ("type", "integer"), ), }, - "io.k8s.api.core.v1.Container": { - "imagePullPolicy": ( - ("enum", None), - None, - ) - }, } for obj_name, field in FIELD_REMAPPINGS.items(): try: diff --git a/src/hera/events/models/__init__.py b/src/hera/events/models/__init__.py index 74a123ef9..acceef28f 100644 --- a/src/hera/events/models/__init__.py +++ b/src/hera/events/models/__init__.py @@ -1,7 +1,7 @@ """[DO NOT EDIT MANUALLY] Auto-generated model classes. Auto-generated by Hera via `make events-models`. -OpenAPI spec URL: https://raw.githubusercontent.com/argoproj/argo-workflows/v3.5.5/api/openapi-spec/swagger.json +OpenAPI spec URL: https://raw.githubusercontent.com/argoproj/argo-workflows/v3.6.2/api/openapi-spec/swagger.json """ from hera.events.models.eventsource import ( @@ -23,6 +23,9 @@ AWSLambdaTrigger, AzureEventHubsTrigger, AzureEventsHubEventSource, + AzureQueueStorageEventSource, + AzureServiceBusEventSource, + AzureServiceBusTrigger, Backoff, BasicAuth, BitbucketAuth, @@ -39,6 +42,7 @@ ConfigMapPersistence, CustomTrigger, DataFilter, + EmailTrigger, EmitterEventSource, EventContext, EventDependency, @@ -54,6 +58,7 @@ FileArtifact, FileEventSource, GenericEventSource, + GerritEventSource, GitArtifact, GitCreds, GithubAppCreds, @@ -90,6 +95,7 @@ S3Bucket, S3Filter, SASLConfig, + SchemaRegistryConfig, SecureHeader, Selector, Sensor, @@ -97,7 +103,10 @@ SensorSpec, SensorStatus, Service, + SFTPEventSource, SlackEventSource, + SlackSender, + SlackThread, SlackTrigger, SNSEventSource, SQSEventSource, @@ -129,18 +138,7 @@ Item, Version, ) -from hera.events.models.io.k8s.api.core.v1 import ( - Effect, - ImagePullPolicy, - Operator, - OperatorModel, - Phase, - Protocol, - Scheme, - TerminationMessagePolicy, - Type, - TypeModel, -) +from hera.events.models.io.k8s.api.core.v1 import ImagePullPolicy from hera.events.models.sensor import ( CreateSensorRequest, DeleteSensorResponse, @@ -161,6 +159,9 @@ "ArtifactLocation", "AzureEventHubsTrigger", "AzureEventsHubEventSource", + "AzureQueueStorageEventSource", + "AzureServiceBusEventSource", + "AzureServiceBusTrigger", "Backoff", "BasicAuth", "BitbucketAuth", @@ -180,7 +181,7 @@ "CustomTrigger", "DataFilter", "DeleteSensorResponse", - "Effect", + "EmailTrigger", "EmitterEventSource", "Event", "EventContext", @@ -201,6 +202,7 @@ "FileArtifact", "FileEventSource", "GenericEventSource", + "GerritEventSource", "GetUserInfoResponse", "GitArtifact", "GitCreds", @@ -226,12 +228,8 @@ "NATSTrigger", "NSQEventSource", "OpenWhiskTrigger", - "Operator", - "OperatorModel", "OwnedRepositories", "PayloadField", - "Phase", - "Protocol", "PubSubEventSource", "PulsarEventSource", "PulsarTrigger", @@ -245,9 +243,10 @@ "S3Bucket", "S3Filter", "SASLConfig", + "SFTPEventSource", "SNSEventSource", "SQSEventSource", - "Scheme", + "SchemaRegistryConfig", "SecureHeader", "Selector", "Sensor", @@ -258,6 +257,8 @@ "SensorWatchEvent", "Service", "SlackEventSource", + "SlackSender", + "SlackThread", "SlackTrigger", "StandardK8STrigger", "Status", @@ -267,15 +268,12 @@ "StripeEventSource", "TLSConfig", "Template", - "TerminationMessagePolicy", "TimeFilter", "Trigger", "TriggerParameter", "TriggerParameterSource", "TriggerPolicy", "TriggerTemplate", - "Type", - "TypeModel", "URLArtifact", "UpdateEventSourceRequest", "UpdateSensorRequest", diff --git a/src/hera/events/models/eventsource.py b/src/hera/events/models/eventsource.py index 1f042a692..715a95aee 100644 --- a/src/hera/events/models/eventsource.py +++ b/src/hera/events/models/eventsource.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/events/models/eventsource.pyi b/src/hera/events/models/eventsource.pyi deleted file mode 100644 index a8ad2eef6..000000000 --- a/src/hera/events/models/eventsource.pyi +++ /dev/null @@ -1,33 +0,0 @@ -from typing import Optional - -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -from .io.argoproj.events import v1alpha1 as v1alpha1 -from .io.k8s.apimachinery.pkg.apis.meta import v1 as v1 - -class EventSourceDeletedResponse(BaseModel): ... - -class LogEntry(BaseModel): - event_name: Optional[str] - event_source_name: Optional[str] - event_source_type: Optional[str] - level: Optional[str] - msg: Optional[str] - namespace: Optional[str] - time: Optional[v1.Time] - -class CreateEventSourceRequest(BaseModel): - event_source: Optional[v1alpha1.EventSource] - namespace: Optional[str] - -class EventSourceWatchEvent(BaseModel): - object: Optional[v1alpha1.EventSource] - type: Optional[str] - -class UpdateEventSourceRequest(BaseModel): - event_source: Optional[v1alpha1.EventSource] - name: Optional[str] - namespace: Optional[str] diff --git a/src/hera/events/models/google/__init__.py b/src/hera/events/models/google/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/google/__init__.py +++ b/src/hera/events/models/google/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/google/protobuf.py b/src/hera/events/models/google/protobuf.py index fac67c8d0..0911c21ba 100644 --- a/src/hera/events/models/google/protobuf.py +++ b/src/hera/events/models/google/protobuf.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/events/models/google/protobuf.pyi b/src/hera/events/models/google/protobuf.pyi deleted file mode 100644 index 8b3b94c4f..000000000 --- a/src/hera/events/models/google/protobuf.pyi +++ /dev/null @@ -1,7 +0,0 @@ -from typing import Optional - -from hera.shared._pydantic import BaseModel as BaseModel - -class Any(BaseModel): - type_url: Optional[str] - value: Optional[str] diff --git a/src/hera/events/models/grpc/gateway/__init__.py b/src/hera/events/models/grpc/gateway/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/grpc/gateway/__init__.py +++ b/src/hera/events/models/grpc/gateway/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/grpc/gateway/runtime.py b/src/hera/events/models/grpc/gateway/runtime.py index 4a8a624de..f337b5ae6 100644 --- a/src/hera/events/models/grpc/gateway/runtime.py +++ b/src/hera/events/models/grpc/gateway/runtime.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/events/models/grpc/gateway/runtime.pyi b/src/hera/events/models/grpc/gateway/runtime.pyi deleted file mode 100644 index c032edf27..000000000 --- a/src/hera/events/models/grpc/gateway/runtime.pyi +++ /dev/null @@ -1,18 +0,0 @@ -from typing import List, Optional - -from hera.shared._pydantic import BaseModel as BaseModel - -from ...google import protobuf as protobuf - -class Error(BaseModel): - code: Optional[int] - details: Optional[List[protobuf.Any]] - error: Optional[str] - message: Optional[str] - -class StreamError(BaseModel): - details: Optional[List[protobuf.Any]] - grpc_code: Optional[int] - http_code: Optional[int] - http_status: Optional[str] - message: Optional[str] diff --git a/src/hera/events/models/io/argoproj/events/__init__.py b/src/hera/events/models/io/argoproj/events/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/io/argoproj/events/__init__.py +++ b/src/hera/events/models/io/argoproj/events/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/io/argoproj/events/v1alpha1.py b/src/hera/events/models/io/argoproj/events/v1alpha1.py index 5c52258e7..fbcde679e 100644 --- a/src/hera/events/models/io/argoproj/events/v1alpha1.py +++ b/src/hera/events/models/io/argoproj/events/v1alpha1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -435,7 +435,7 @@ class Selector(BaseModel): Optional[str], Field( title=( - "Supported operations like ==, !=, <=, >= etc.\nDefaults to ==.\nRefer" + "Supported operations like ==, != etc.\nDefaults to ==.\nRefer" " https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" " for more io.argoproj.workflow.v1alpha1.\n+optional" ) @@ -444,6 +444,42 @@ class Selector(BaseModel): value: Annotated[Optional[str], Field(title="Value")] = None +class SlackSender(BaseModel): + icon: Annotated[ + Optional[str], + Field( + title=( + "Icon is the Slack application's icon, e.g. :robot_face: or" + " https://example.com/image.png\n+optional" + ) + ), + ] = None + username: Annotated[ + Optional[str], + Field(title="Username is the Slack application's username\n+optional"), + ] = None + + +class SlackThread(BaseModel): + broadcast_message_to_channel: Annotated[ + Optional[bool], + Field( + alias="broadcastMessageToChannel", + title=( + "BroadcastMessageToChannel allows to also broadcast the message from" + " the thread to the channel\n+optional" + ), + ), + ] = None + message_aggregation_key: Annotated[ + Optional[str], + Field( + alias="messageAggregationKey", + title=("MessageAggregationKey allows to aggregate the messages to a thread by" " some key.\n+optional"), + ), + ] = None + + class StatusPolicy(BaseModel): allow: Optional[List[int]] = None @@ -525,6 +561,21 @@ class TriggerParameterSource(BaseModel): ), ), ] = None + use_raw_data: Annotated[ + Optional[bool], + Field( + alias="useRawData", + title=( + "UseRawData indicates if the value in an event at data key should be" + " used without converting to string.\nWhen true, a number, boolean," + " json or string parameter may be extracted. When the field is" + " unspecified, or explicitly\nfalse, the behavior is to turn the" + " extracted field into a string. (e.g. when set to true, the" + " parameter\n123 will resolve to the numerical type, but when false, or" + ' not provided, the string "123" will be resolved)\n+optional' + ), + ), + ] = None value: Annotated[ Optional[str], Field( @@ -641,7 +692,11 @@ class ResourceFilter(BaseModel): title=( "Labels provide listing options to K8s API to watch resource/s.\nRefer" " https://kubernetes.io/docs/concepts/overview/working-with-objects/label-selectors/" - " for more io.argoproj.workflow.v1alpha1.\n+optional" + " for more io.argoproj.workflow.v1alpha1.\nUnlike K8s field selector," + " multiple values are passed as comma separated values instead of list" + " of values.\nEg: value: value1,value2.\nSame as K8s label selector," + ' operator "=", "==", "!=", "exists", "!", "notin", "in", "gt" and' + ' "lt"\nare supported\n+optional' ) ), ] = None @@ -685,6 +740,85 @@ class AzureEventsHubEventSource(BaseModel): ] = None +class AzureQueueStorageEventSource(BaseModel): + connection_string: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="connectionString", + title=( + "ConnectionString is the connection string to access Azure Queue" + " Storage. If this fields is not provided\nit will try to access via" + " Azure AD with StorageAccountName.\n+optional" + ), + ), + ] = None + decode_message: Annotated[ + Optional[bool], + Field( + alias="decodeMessage", + title=( + "DecodeMessage specifies if all the messages should be base64" + " decoded.\nIf set to true the decoding is done before the evaluation" + " of JSONBody\n+optional" + ), + ), + ] = None + dlq: Annotated[ + Optional[bool], + Field( + title=( + "DLQ specifies if a dead-letter queue is configured for messages that" + " can't be processed successfully.\nIf set to true, messages with" + " invalid payload won't be acknowledged to allow to forward them" + " farther to the dead-letter queue.\nThe default value is" + " false.\n+optional" + ) + ), + ] = None + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + json_body: Annotated[ + Optional[bool], + Field( + alias="jsonBody", + title=( + "JSONBody specifies that all event body payload coming from" " this\nsource will be JSON\n+optional" + ), + ), + ] = None + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + queue_name: Annotated[ + Optional[str], + Field(alias="queueName", title="QueueName is the name of the queue"), + ] = None + storage_account_name: Annotated[ + Optional[str], + Field( + alias="storageAccountName", + title=( + "StorageAccountName is the name of the storage account where the queue" + " is. This field is necessary to\naccess via Azure AD (managed" + " identity) and it is ignored if ConnectionString is set.\n+optional" + ), + ), + ] = None + wait_time_in_seconds: Annotated[ + Optional[int], + Field( + alias="waitTimeInSeconds", + title=( + "WaitTimeInSeconds is the duration (in seconds) for which the event" + " source waits between empty results from the queue.\nThe default value" + " is 3 seconds.\n+optional" + ), + ), + ] = None + + class BasicAuth(BaseModel): password: Annotated[ Optional[v1_1.SecretKeySelector], @@ -871,17 +1005,18 @@ class SASLConfig(BaseModel): ) ), ] = None - password: Annotated[ + password_secret: Annotated[ Optional[v1_1.SecretKeySelector], - Field(title="Password for SASL/PLAIN authentication"), + Field(alias="passwordSecret", title="Password for SASL/PLAIN authentication"), ] = None - user: Annotated[ + user_secret: Annotated[ Optional[v1_1.SecretKeySelector], Field( + alias="userSecret", title=( "User is the authentication identity (authcid) to present" " for\nSASL/PLAIN or SASL/SCRAM authentication" - ) + ), ), ] = None @@ -1229,9 +1364,64 @@ class HDFSEventSource(BaseModel): watch_path_config: Annotated[Optional[WatchPathConfig], Field(alias="watchPathConfig")] = None +class SFTPEventSource(BaseModel): + address: Annotated[Optional[v1_1.SecretKeySelector], Field(description="Address sftp address.")] = None + event_type: Annotated[ + Optional[str], + Field( + alias="eventType", + title=( + "Type of file operations to watch\nRefer" + " https://github.com/fsnotify/fsnotify/blob/master/fsnotify.go for more" + " information" + ), + ), + ] = None + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + password: Annotated[ + Optional[v1_1.SecretKeySelector], + Field(description="Password required for authentication if any."), + ] = None + poll_interval_duration: Annotated[ + Optional[str], + Field( + alias="pollIntervalDuration", + title=( + "PollIntervalDuration the interval at which to poll the SFTP" + " server\ndefaults to 10 seconds\n+optional" + ), + ), + ] = None + ssh_key_secret: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="sshKeySecret", + title="SSHKeySecret refers to the secret that contains SSH key", + ), + ] = None + username: Annotated[ + Optional[v1_1.SecretKeySelector], + Field(description="Username required for authentication if any."), + ] = None + watch_path_config: Annotated[ + Optional[WatchPathConfig], + Field( + alias="watchPathConfig", + title="WatchPathConfig contains configuration about the file path to watch", + ), + ] = None + + class S3Artifact(BaseModel): access_key: Annotated[Optional[v1_1.SecretKeySelector], Field(alias="accessKey")] = None bucket: Optional[S3Bucket] = None + ca_certificate: Annotated[Optional[v1_1.SecretKeySelector], Field(alias="caCertificate")] = None endpoint: Optional[str] = None events: Optional[List[str]] = None filter: Optional[S3Filter] = None @@ -1318,6 +1508,15 @@ class NATSAuth(BaseModel): ] = None +class SchemaRegistryConfig(BaseModel): + auth: Annotated[ + Optional[BasicAuth], + Field(title="+optional\nSchemaRegistry - basic authentication"), + ] = None + schema_id: Annotated[Optional[int], Field(alias="schemaId", title="Schema ID")] = None + url: Annotated[Optional[str], Field(description="Schema Registry URL.")] = None + + class BitbucketAuth(BaseModel): basic: Annotated[ Optional[BitbucketBasicAuth], @@ -1384,41 +1583,88 @@ class GitArtifact(BaseModel): url: Annotated[Optional[str], Field(title="Git URL")] = None -class KafkaTrigger(BaseModel): - compress: Annotated[ - Optional[bool], +class AzureServiceBusEventSource(BaseModel): + connection_string: Annotated[ + Optional[v1_1.SecretKeySelector], Field( + alias="connectionString", title=( - "Compress determines whether to compress message or not.\nDefaults to" - " false.\nIf set to true, compresses message using snappy" - " compression.\n+optional" - ) + "ConnectionString is the connection string for the Azure Service Bus." + " If this fields is not provided\nit will try to access via Azure AD" + " with DefaultAzureCredential and FullyQualifiedNamespace.\n+optional" + ), ), ] = None - flush_frequency: Annotated[ - Optional[int], + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + fully_qualified_namespace: Annotated[ + Optional[str], Field( - alias="flushFrequency", + alias="fullyQualifiedNamespace", title=( - "FlushFrequency refers to the frequency in milliseconds to flush" - " batches.\nDefaults to 500 milliseconds.\n+optional" + "FullyQualifiedNamespace is the Service Bus namespace name (ex:" + " myservicebus.servicebus.windows.net). This field is necessary" + " to\naccess via Azure AD (managed identity) and it is ignored if" + " ConnectionString is set.\n+optional" ), ), ] = None - parameters: Annotated[ - Optional[List[TriggerParameter]], + json_body: Annotated[ + Optional[bool], Field( - description=("Parameters is the list of parameters that is applied to resolved Kafka" " trigger object.") + alias="jsonBody", + title=( + "JSONBody specifies that all event body payload coming from" " this\nsource will be JSON\n+optional" + ), ), ] = None - partition: Annotated[Optional[int], Field(description="Partition to write data to.")] = None - partitioning_key: Annotated[ + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + queue_name: Annotated[ Optional[str], Field( - alias="partitioningKey", - description=( - "The partitioning key for the messages put on the Kafka" " topic.\nDefaults to broker url.\n+optional." - ), + alias="queueName", + title="QueueName is the name of the Azure Service Bus Queue", + ), + ] = None + subscription_name: Annotated[ + Optional[str], + Field( + alias="subscriptionName", + title=("SubscriptionName is the name of the Azure Service Bus Topic" " Subscription"), + ), + ] = None + tls: Annotated[ + Optional[TLSConfig], + Field(title="TLS configuration for the service bus client\n+optional"), + ] = None + topic_name: Annotated[ + Optional[str], + Field( + alias="topicName", + title="TopicName is the name of the Azure Service Bus Topic", + ), + ] = None + + +class AzureServiceBusTrigger(BaseModel): + connection_string: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="connectionString", + title="ConnectionString is the connection string for the Azure Service Bus", + ), + ] = None + parameters: Annotated[ + Optional[List[TriggerParameter]], + Field( + title=( + "Parameters is the list of key-value extracted from event's payload" + " that are applied to\nthe trigger resource.\n+optional" + ) ), ] = None payload: Annotated[ @@ -1429,40 +1675,29 @@ class KafkaTrigger(BaseModel): ) ), ] = None - required_acks: Annotated[ - Optional[int], + queue_name: Annotated[ + Optional[str], Field( - alias="requiredAcks", - description=( - "RequiredAcks used in producer to tell the broker how many replica" - " acknowledgements\nDefaults to 1 (Only wait for the leader to" - " ack).\n+optional." - ), + alias="queueName", + title="QueueName is the name of the Azure Service Bus Queue", ), ] = None - sasl: Annotated[ - Optional[SASLConfig], - Field(title="SASL configuration for the kafka client\n+optional"), + subscription_name: Annotated[ + Optional[str], + Field( + alias="subscriptionName", + title=("SubscriptionName is the name of the Azure Service Bus Topic" " Subscription"), + ), ] = None tls: Annotated[ Optional[TLSConfig], - Field(title="TLS configuration for the Kafka producer.\n+optional"), + Field(title="TLS configuration for the service bus client\n+optional"), ] = None - topic: Annotated[ - Optional[str], - Field(title=("Name of the topic.\nMore info at" " https://kafka.apache.org/documentation/#intro_topics")), - ] = None - url: Annotated[ - Optional[str], - Field(description="URL of the Kafka broker, multiple URLs separated by comma."), - ] = None - version: Annotated[ + topic_name: Annotated[ Optional[str], Field( - title=( - "Specify what kafka version is being connected to enables certain" - " features in sarama, defaults to 1.0.0\n+optional" - ) + alias="topicName", + title="TopicName is the name of the Azure Service Bus Topic", ), ] = None @@ -1663,6 +1898,10 @@ class BitbucketServerEventSource(BaseModel): ), ), ] = None + tls: Annotated[ + Optional[TLSConfig], + Field(title="TLS configuration for the bitbucketserver client.\n+optional"), + ] = None webhook: Annotated[ Optional[WebhookContext], Field(title="Webhook holds configuration to run a http server"), @@ -1679,6 +1918,62 @@ class BitbucketServerEventSource(BaseModel): ] = None +class GerritEventSource(BaseModel): + auth: Annotated[ + Optional[BasicAuth], + Field(title="Auth hosts secret selectors for username and password\n+optional"), + ] = None + delete_hook_on_finish: Annotated[ + Optional[bool], + Field( + alias="deleteHookOnFinish", + title=( + "DeleteHookOnFinish determines whether to delete the Gerrit hook for" + " the project once the event source is stopped.\n+optional" + ), + ), + ] = None + events: Annotated[ + Optional[List[str]], + Field( + title=( + "Events are gerrit event to listen to.\nRefer" + " https://gerrit-review.googlesource.com/Documentation/cmd-stream-events.html#events" + ) + ), + ] = None + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + gerrit_base_url: Annotated[ + Optional[str], + Field( + alias="gerritBaseURL", + title="GerritBaseURL is the base URL for API requests to a custom endpoint", + ), + ] = None + hook_name: Annotated[ + Optional[str], + Field(alias="hookName", title="HookName is the name of the webhook"), + ] = None + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + projects: Annotated[ + Optional[List[str]], + Field(description='List of project namespace paths like "whynowy/test".'), + ] = None + ssl_verify: Annotated[ + Optional[bool], + Field(alias="sslVerify", title="SslVerify to enable ssl verification\n+optional"), + ] = None + webhook: Annotated[ + Optional[WebhookContext], + Field(title="Webhook holds configuration to run a http server"), + ] = None + + class GithubEventSource(BaseModel): active: Annotated[ Optional[bool], @@ -1847,6 +2142,15 @@ class GitlabEventSource(BaseModel): title="GitlabBaseURL is the base URL for API requests to a custom endpoint", ), ] = None + groups: Annotated[ + Optional[List[str]], + Field( + title=( + 'List of group IDs or group name like "test".\nGroup level hook' + " available in Premium and Ultimate Gitlab.\n+optional" + ) + ), + ] = None metadata: Annotated[ Optional[Dict[str, str]], Field( @@ -1866,7 +2170,12 @@ class GitlabEventSource(BaseModel): ] = None projects: Annotated[ Optional[List[str]], - Field(title='List of project IDs or project namespace paths like "whynowy/test"'), + Field( + title=( + 'List of project IDs or project namespace paths like "whynowy/test".' + " Projects and groups cannot be empty at the same time.\n+optional" + ) + ), ] = None secret_token: Annotated[ Optional[v1_1.SecretKeySelector], @@ -2220,7 +2529,7 @@ class KafkaEventSource(BaseModel): description=( "Yaml format Sarama config for Kafka connection.\nIt follows the struct" " of sarama.Config. See" - " https://github.com/Shopify/sarama/blob/main/config.go\ne.g.\n\nconsumer:\n" + " https://github.com/IBM/sarama/blob/main/config.go\ne.g.\n\nconsumer:\n" " fetch:\n min: 1\nnet:\n MaxOpenRequests: 5\n\n+optional" ) ), @@ -2259,7 +2568,7 @@ class KafkaEventSource(BaseModel): title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") ), ] = None - partition: Annotated[Optional[str], Field(title="Partition name")] = None + partition: Annotated[Optional[str], Field(title="Partition name\n+optional")] = None sasl: Annotated[ Optional[SASLConfig], Field(title="SASL configuration for the kafka client\n+optional"), @@ -2285,6 +2594,10 @@ class KafkaEventSource(BaseModel): class MQTTEventSource(BaseModel): + auth: Annotated[ + Optional[BasicAuth], + Field(title="Auth hosts secret selectors for username and password\n+optional"), + ] = None client_id: Annotated[Optional[str], Field(alias="clientId", title="ClientID is the id of the client")] = None connection_backoff: Annotated[ Optional[Backoff], @@ -2357,11 +2670,36 @@ class NSQEventSource(BaseModel): class PulsarEventSource(BaseModel): + auth_athenz_params: Annotated[ + Optional[Dict[str, str]], + Field( + alias="authAthenzParams", + title=( + "Authentication athenz parameters for the pulsar client.\nRefer" + " https://github.com/apache/pulsar-client-go/blob/master/pulsar/auth/athenz.go\nEither" + " token or athenz can be set to use auth.\n+optional" + ), + ), + ] = None + auth_athenz_secret: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="authAthenzSecret", + title=( + "Authentication athenz privateKey secret for the pulsar" + " client.\nAuthAthenzSecret must be set if AuthAthenzParams is" + " used.\n+optional" + ), + ), + ] = None auth_token_secret: Annotated[ Optional[v1_1.SecretKeySelector], Field( alias="authTokenSecret", - title="Authentication token for the pulsar client.\n+optional", + title=( + "Authentication token for the pulsar client.\nEither token or athenz" + " can be set to use auth.\n+optional" + ), ), ] = None connection_backoff: Annotated[ @@ -2432,11 +2770,36 @@ class PulsarEventSource(BaseModel): class PulsarTrigger(BaseModel): + auth_athenz_params: Annotated[ + Optional[Dict[str, str]], + Field( + alias="authAthenzParams", + title=( + "Authentication athenz parameters for the pulsar client.\nRefer" + " https://github.com/apache/pulsar-client-go/blob/master/pulsar/auth/athenz.go\nEither" + " token or athenz can be set to use auth.\n+optional" + ), + ), + ] = None + auth_athenz_secret: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="authAthenzSecret", + title=( + "Authentication athenz privateKey secret for the pulsar" + " client.\nAuthAthenzSecret must be set if AuthAthenzParams is" + " used.\n+optional" + ), + ), + ] = None auth_token_secret: Annotated[ Optional[v1_1.SecretKeySelector], Field( alias="authTokenSecret", - title="Authentication token for the pulsar client.\n+optional", + title=( + "Authentication token for the pulsar client.\nEither token or athenz" + " can be set to use auth.\n+optional" + ), ), ] = None connection_backoff: Annotated[ @@ -2566,6 +2929,94 @@ class NATSEventsSource(BaseModel): url: Annotated[Optional[str], Field(title="URL to connect to NATS cluster")] = None +class KafkaTrigger(BaseModel): + compress: Annotated[ + Optional[bool], + Field( + title=( + "Compress determines whether to compress message or not.\nDefaults to" + " false.\nIf set to true, compresses message using snappy" + " compression.\n+optional" + ) + ), + ] = None + flush_frequency: Annotated[ + Optional[int], + Field( + alias="flushFrequency", + title=( + "FlushFrequency refers to the frequency in milliseconds to flush" + " batches.\nDefaults to 500 milliseconds.\n+optional" + ), + ), + ] = None + parameters: Annotated[ + Optional[List[TriggerParameter]], + Field( + description=("Parameters is the list of parameters that is applied to resolved Kafka" " trigger object.") + ), + ] = None + partition: Annotated[Optional[int], Field(title="+optional\nDEPRECATED")] = None + partitioning_key: Annotated[ + Optional[str], + Field( + alias="partitioningKey", + description=("The partitioning key for the messages put on the Kafka" " topic.\n+optional."), + ), + ] = None + payload: Annotated[ + Optional[List[TriggerParameter]], + Field( + description=( + "Payload is the list of key-value extracted from an event payload to" " construct the request payload." + ) + ), + ] = None + required_acks: Annotated[ + Optional[int], + Field( + alias="requiredAcks", + description=( + "RequiredAcks used in producer to tell the broker how many replica" + " acknowledgements\nDefaults to 1 (Only wait for the leader to" + " ack).\n+optional." + ), + ), + ] = None + sasl: Annotated[ + Optional[SASLConfig], + Field(title="SASL configuration for the kafka client\n+optional"), + ] = None + schema_registry: Annotated[ + Optional[SchemaRegistryConfig], + Field( + alias="schemaRegistry", + title=("Schema Registry configuration to producer message with avro" " format\n+optional"), + ), + ] = None + tls: Annotated[ + Optional[TLSConfig], + Field(title="TLS configuration for the Kafka producer.\n+optional"), + ] = None + topic: Annotated[ + Optional[str], + Field(title=("Name of the topic.\nMore info at" " https://kafka.apache.org/documentation/#intro_topics")), + ] = None + url: Annotated[ + Optional[str], + Field(description="URL of the Kafka broker, multiple URLs separated by comma."), + ] = None + version: Annotated[ + Optional[str], + Field( + title=( + "Specify what kafka version is being connected to enables certain" + " features in sarama, defaults to 1.0.0\n+optional" + ) + ), + ] = None + + class BitbucketEventSource(BaseModel): auth: Annotated[ Optional[BitbucketAuth], @@ -2958,6 +3409,59 @@ class CustomTrigger(BaseModel): ] = None +class EmailTrigger(BaseModel): + body: Annotated[ + Optional[str], + Field(title="Body refers to the body/content of the email send.\n+optional"), + ] = None + from_: Annotated[ + Optional[str], + Field( + alias="from", + title=("From refers to the address from which the email is send" " from.\n+optional"), + ), + ] = None + host: Annotated[ + Optional[str], + Field(description="Host refers to the smtp host url to which email is send."), + ] = None + parameters: Annotated[ + Optional[List[TriggerParameter]], + Field( + title=( + "Parameters is the list of key-value extracted from event's payload" + " that are applied to\nthe trigger resource.\n+optional" + ) + ), + ] = None + port: Annotated[ + Optional[int], + Field(title=("Port refers to the smtp server port to which email is send.\nDefaults" " to 0.\n+optional")), + ] = None + smtp_password: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="smtpPassword", + title=( + "SMTPPassword refers to the Kubernetes secret that holds the smtp" + " password used to connect to smtp server.\n+optional" + ), + ), + ] = None + subject: Annotated[ + Optional[str], + Field(title="Subject refers to the subject line for the email send.\n+optional"), + ] = None + to: Annotated[ + Optional[List[str]], + Field(title=("To refers to the email addresses to which the emails are" " send.\n+optional")), + ] = None + username: Annotated[ + Optional[str], + Field(title=("Username refers to the username used to connect to the smtp" " server.\n+optional")), + ] = None + + class OpenWhiskTrigger(BaseModel): action_name: Annotated[ Optional[str], @@ -2992,10 +3496,38 @@ class OpenWhiskTrigger(BaseModel): version: Annotated[Optional[str], Field(title="Version for the API.\nDefaults to v1.\n+optional")] = None +class EventSourceStatus(BaseModel): + status: Optional[Status] = None + + +class SensorStatus(BaseModel): + status: Optional[Status] = None + + class SlackTrigger(BaseModel): + attachments: Annotated[ + Optional[str], + Field( + title=( + "Attachments is a JSON format string that represents an array of Slack" + " attachments according to the attachments API:" + " https://api.slack.com/reference/messaging/attachments .\n+optional" + ) + ), + ] = None + blocks: Annotated[ + Optional[str], + Field( + title=( + "Blocks is a JSON format string that represents an array of Slack" + " blocks according to the blocks API:" + " https://api.slack.com/reference/block-kit/blocks .\n+optional" + ) + ), + ] = None channel: Annotated[ Optional[str], - Field(title=("Channel refers to which Slack channel to send slack" " message.\n+optional")), + Field(title=("Channel refers to which Slack channel to send Slack" " message.\n+optional")), ] = None message: Annotated[ Optional[str], @@ -3010,6 +3542,15 @@ class SlackTrigger(BaseModel): ) ), ] = None + sender: Annotated[ + Optional[SlackSender], + Field( + title=( + "Sender refers to additional configuration of the Slack application" + " that sends the message.\n+optional" + ) + ), + ] = None slack_token: Annotated[ Optional[v1_1.SecretKeySelector], Field( @@ -3019,14 +3560,10 @@ class SlackTrigger(BaseModel): ), ), ] = None - - -class EventSourceStatus(BaseModel): - status: Optional[Status] = None - - -class SensorStatus(BaseModel): - status: Optional[Status] = None + thread: Annotated[ + Optional[SlackThread], + Field(title=("Thread refers to additional options for sending messages to a Slack" " thread.\n+optional")), + ] = None class EventDependencyFilter(BaseModel): @@ -3197,6 +3734,15 @@ class TriggerTemplate(BaseModel): title=("AzureEventHubs refers to the trigger send an event to an Azure Event" " Hub.\n+optional"), ), ] = None + azure_service_bus: Annotated[ + Optional[AzureServiceBusTrigger], + Field( + alias="azureServiceBus", + title=( + "AzureServiceBus refers to the trigger designed to place messages on" " Azure Service Bus\n+optional" + ), + ), + ] = None conditions: Annotated[ Optional[str], Field( @@ -3219,6 +3765,10 @@ class TriggerTemplate(BaseModel): ) ), ] = None + email: Annotated[ + Optional[EmailTrigger], + Field(title=("Email refers to the trigger designed to send an email" " notification\n+optional")), + ] = None http: Annotated[ Optional[HTTPTrigger], Field( @@ -3270,6 +3820,18 @@ class TriggerTemplate(BaseModel): class Trigger(BaseModel): + at_least_once: Annotated[ + Optional[bool], + Field( + alias="atLeastOnce", + title=( + "AtLeastOnce determines the trigger execution semantics.\nDefaults to" + " false. Trigger execution will use at-most-once semantics.\nIf set to" + " true, Trigger execution will switch to at-least-once" + " semantics.\n+kubebuilder:default=false\n+optional" + ), + ), + ] = None parameters: Annotated[ Optional[List[TriggerParameter]], Field(title=("Parameters is the list of parameters applied to the trigger template" " definition")), @@ -3406,6 +3968,14 @@ class EventSourceSpec(BaseModel): Optional[Dict[str, AzureEventsHubEventSource]], Field(alias="azureEventsHub", title="AzureEventsHub event sources"), ] = None + azure_queue_storage: Annotated[ + Optional[Dict[str, AzureQueueStorageEventSource]], + Field(alias="azureQueueStorage", title="AzureQueueStorage event source"), + ] = None + azure_service_bus: Annotated[ + Optional[Dict[str, AzureServiceBusEventSource]], + Field(alias="azureServiceBus", title="Azure Service Bus event source"), + ] = None bitbucket: Annotated[ Optional[Dict[str, BitbucketEventSource]], Field(title="Bitbucket event sources"), @@ -3425,6 +3995,7 @@ class EventSourceSpec(BaseModel): ] = None file: Annotated[Optional[Dict[str, FileEventSource]], Field(title="File event sources")] = None generic: Annotated[Optional[Dict[str, GenericEventSource]], Field(title="Generic event source")] = None + gerrit: Annotated[Optional[Dict[str, GerritEventSource]], Field(title="Gerrit event source")] = None github: Annotated[Optional[Dict[str, GithubEventSource]], Field(title="Github event sources")] = None gitlab: Annotated[Optional[Dict[str, GitlabEventSource]], Field(title="Gitlab event sources")] = None hdfs: Annotated[Optional[Dict[str, HDFSEventSource]], Field(title="HDFS event sources")] = None @@ -3449,6 +4020,7 @@ class EventSourceSpec(BaseModel): Optional[Service], Field(title=("Service is the specifications of the service to expose the event" " source\n+optional")), ] = None + sftp: Annotated[Optional[Dict[str, SFTPEventSource]], Field(title="SFTP event sources")] = None slack: Annotated[Optional[Dict[str, SlackEventSource]], Field(title="Slack event sources")] = None sns: Annotated[Optional[Dict[str, SNSEventSource]], Field(title="SNS event sources")] = None sqs: Annotated[Optional[Dict[str, SQSEventSource]], Field(title="SQS event sources")] = None @@ -3487,7 +4059,21 @@ class SensorSpec(BaseModel): title=("EventBusName references to a EventBus name. By default the value is" ' "default"'), ), ] = None + logging_fields: Annotated[ + Optional[Dict[str, str]], + Field( + alias="loggingFields", + title=("LoggingFields add additional key-value pairs when logging" " happens\n+optional"), + ), + ] = None replicas: Annotated[Optional[int], Field(title="Replicas is the sensor deployment replicas")] = None + revision_history_limit: Annotated[ + Optional[int], + Field( + alias="revisionHistoryLimit", + title=("RevisionHistoryLimit specifies how many old deployment revisions to" " retain\n+optional"), + ), + ] = None template: Annotated[ Optional[Template], Field(title="Template is the pod specification for the sensor\n+optional"), diff --git a/src/hera/events/models/io/argoproj/events/v1alpha1.pyi b/src/hera/events/models/io/argoproj/events/v1alpha1.pyi deleted file mode 100644 index e0192ca9b..000000000 --- a/src/hera/events/models/io/argoproj/events/v1alpha1.pyi +++ /dev/null @@ -1,810 +0,0 @@ -from typing import Dict, List, Optional - -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -from ...k8s.api.core import v1 as v1 -from ...k8s.apimachinery.pkg.apis.meta import v1 as v1_1 - -class AMQPConsumeConfig(BaseModel): - auto_ack: Optional[bool] - consumer_tag: Optional[str] - exclusive: Optional[bool] - no_local: Optional[bool] - no_wait: Optional[bool] - -class AMQPExchangeDeclareConfig(BaseModel): - auto_delete: Optional[bool] - durable: Optional[bool] - internal: Optional[bool] - no_wait: Optional[bool] - -class AMQPQueueBindConfig(BaseModel): - no_wait: Optional[bool] - -class AMQPQueueDeclareConfig(BaseModel): - arguments: Optional[str] - auto_delete: Optional[bool] - durable: Optional[bool] - exclusive: Optional[bool] - name: Optional[str] - no_wait: Optional[bool] - -class Amount(BaseModel): - value: Optional[str] - -class BitbucketRepository(BaseModel): - owner: Optional[str] - repository_slug: Optional[str] - -class BitbucketServerRepository(BaseModel): - project_key: Optional[str] - repository_slug: Optional[str] - -class CatchupConfiguration(BaseModel): - enabled: Optional[bool] - max_duration: Optional[str] - -class ConditionsResetByTime(BaseModel): - cron: Optional[str] - timezone: Optional[str] - -class ConditionsResetCriteria(BaseModel): - by_time: Optional[ConditionsResetByTime] - -class ConfigMapPersistence(BaseModel): - create_if_not_exist: Optional[bool] - name: Optional[str] - -class DataFilter(BaseModel): - comparator: Optional[str] - path: Optional[str] - template: Optional[str] - type: Optional[str] - value: Optional[List[str]] - -class EventDependencyTransformer(BaseModel): - jq: Optional[str] - script: Optional[str] - -class EventPersistence(BaseModel): - catchup: Optional[CatchupConfiguration] - config_map: Optional[ConfigMapPersistence] - -class EventSourceFilter(BaseModel): - expression: Optional[str] - -class FileArtifact(BaseModel): - path: Optional[str] - -class GitRemoteConfig(BaseModel): - name: Optional[str] - urls: Optional[List[str]] - -class Int64OrString(BaseModel): - int64_val: Optional[str] - str_val: Optional[str] - type: Optional[str] - -class KafkaConsumerGroup(BaseModel): - group_name: Optional[str] - oldest: Optional[bool] - rebalance_strategy: Optional[str] - -class LogTrigger(BaseModel): - interval_seconds: Optional[str] - -class Metadata(BaseModel): - annotations: Optional[Dict[str, str]] - labels: Optional[Dict[str, str]] - -class OwnedRepositories(BaseModel): - names: Optional[List[str]] - owner: Optional[str] - -class PayloadField(BaseModel): - name: Optional[str] - path: Optional[str] - -class RateLimit(BaseModel): - requests_per_unit: Optional[int] - unit: Optional[str] - -class Resource(BaseModel): - value: Optional[str] - -class S3Bucket(BaseModel): - key: Optional[str] - name: Optional[str] - -class S3Filter(BaseModel): - prefix: Optional[str] - suffix: Optional[str] - -class Selector(BaseModel): - key: Optional[str] - operation: Optional[str] - value: Optional[str] - -class StatusPolicy(BaseModel): - allow: Optional[List[int]] - -class StorageGridFilter(BaseModel): - prefix: Optional[str] - suffix: Optional[str] - -class TimeFilter(BaseModel): - start: Optional[str] - stop: Optional[str] - -class TriggerParameterSource(BaseModel): - context_key: Optional[str] - context_template: Optional[str] - data_key: Optional[str] - data_template: Optional[str] - dependency_name: Optional[str] - value: Optional[str] - -class URLArtifact(BaseModel): - path: Optional[str] - verify_cert: Optional[bool] - -class WatchPathConfig(BaseModel): - directory: Optional[str] - path: Optional[str] - path_regexp: Optional[str] - -class AzureEventsHubEventSource(BaseModel): - filter: Optional[EventSourceFilter] - fqdn: Optional[str] - hub_name: Optional[str] - metadata: Optional[Dict[str, str]] - shared_access_key: Optional[v1.SecretKeySelector] - shared_access_key_name: Optional[v1.SecretKeySelector] - -class Backoff(BaseModel): - duration: Optional[Int64OrString] - factor: Optional[Amount] - jitter: Optional[Amount] - steps: Optional[int] - -class BasicAuth(BaseModel): - password: Optional[v1.SecretKeySelector] - username: Optional[v1.SecretKeySelector] - -class BitbucketBasicAuth(BaseModel): - password: Optional[v1.SecretKeySelector] - username: Optional[v1.SecretKeySelector] - -class CalendarEventSource(BaseModel): - exclusion_dates: Optional[List[str]] - filter: Optional[EventSourceFilter] - interval: Optional[str] - metadata: Optional[Dict[str, str]] - persistence: Optional[EventPersistence] - schedule: Optional[str] - timezone: Optional[str] - -class Condition(BaseModel): - last_transition_time: Optional[v1_1.Time] - message: Optional[str] - reason: Optional[str] - status: Optional[str] - type: Optional[str] - -class EventContext(BaseModel): - datacontenttype: Optional[str] - id: Optional[str] - source: Optional[str] - specversion: Optional[str] - subject: Optional[str] - time: Optional[v1_1.Time] - type: Optional[str] - -class ExprFilter(BaseModel): - expr: Optional[str] - fields: Optional[List[PayloadField]] - -class FileEventSource(BaseModel): - event_type: Optional[str] - filter: Optional[EventSourceFilter] - metadata: Optional[Dict[str, str]] - polling: Optional[bool] - watch_path_config: Optional[WatchPathConfig] - -class GenericEventSource(BaseModel): - auth_secret: Optional[v1.SecretKeySelector] - config: Optional[str] - filter: Optional[EventSourceFilter] - insecure: Optional[bool] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - url: Optional[str] - -class GitCreds(BaseModel): - password: Optional[v1.SecretKeySelector] - username: Optional[v1.SecretKeySelector] - -class GithubAppCreds(BaseModel): - app_id: Optional[str] - installation_id: Optional[str] - private_key: Optional[v1.SecretKeySelector] - -class HDFSEventSource(BaseModel): - addresses: Optional[List[str]] - check_interval: Optional[str] - filter: Optional[EventSourceFilter] - hdfs_user: Optional[str] - krb_c_cache_secret: Optional[v1.SecretKeySelector] - krb_config_config_map: Optional[v1.ConfigMapKeySelector] - krb_keytab_secret: Optional[v1.SecretKeySelector] - krb_realm: Optional[str] - krb_service_principal_name: Optional[str] - krb_username: Optional[str] - metadata: Optional[Dict[str, str]] - type: Optional[str] - watch_path_config: Optional[WatchPathConfig] - -class K8SResourcePolicy(BaseModel): - backoff: Optional[Backoff] - error_on_backoff_timeout: Optional[bool] - labels: Optional[Dict[str, str]] - -class NATSAuth(BaseModel): - basic: Optional[BasicAuth] - credential: Optional[v1.SecretKeySelector] - nkey: Optional[v1.SecretKeySelector] - token: Optional[v1.SecretKeySelector] - -class PubSubEventSource(BaseModel): - credential_secret: Optional[v1.SecretKeySelector] - delete_subscription_on_finish: Optional[bool] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - project_id: Optional[str] - subscription_id: Optional[str] - topic: Optional[str] - topic_project_id: Optional[str] - -class ResourceFilter(BaseModel): - after_start: Optional[bool] - created_by: Optional[v1_1.Time] - fields: Optional[List[Selector]] - labels: Optional[List[Selector]] - prefix: Optional[str] - -class S3Artifact(BaseModel): - access_key: Optional[v1.SecretKeySelector] - bucket: Optional[S3Bucket] - endpoint: Optional[str] - events: Optional[List[str]] - filter: Optional[S3Filter] - insecure: Optional[bool] - metadata: Optional[Dict[str, str]] - region: Optional[str] - secret_key: Optional[v1.SecretKeySelector] - -class SASLConfig(BaseModel): - mechanism: Optional[str] - password: Optional[v1.SecretKeySelector] - user: Optional[v1.SecretKeySelector] - -class SQSEventSource(BaseModel): - access_key: Optional[v1.SecretKeySelector] - dlq: Optional[bool] - endpoint: Optional[str] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - queue: Optional[str] - queue_account_id: Optional[str] - region: Optional[str] - role_arn: Optional[str] - secret_key: Optional[v1.SecretKeySelector] - session_token: Optional[v1.SecretKeySelector] - wait_time_seconds: Optional[str] - -class Status(BaseModel): - conditions: Optional[List[Condition]] - -class TLSConfig(BaseModel): - ca_cert_secret: Optional[v1.SecretKeySelector] - client_cert_secret: Optional[v1.SecretKeySelector] - client_key_secret: Optional[v1.SecretKeySelector] - insecure_skip_verify: Optional[bool] - -class TriggerParameter(BaseModel): - dest: Optional[str] - operation: Optional[str] - src: Optional[TriggerParameterSource] - -class TriggerPolicy(BaseModel): - k8s: Optional[K8SResourcePolicy] - status: Optional[StatusPolicy] - -class ValueFromSource(BaseModel): - config_map_key_ref: Optional[v1.ConfigMapKeySelector] - secret_key_ref: Optional[v1.SecretKeySelector] - -class WebhookContext(BaseModel): - auth_secret: Optional[v1.SecretKeySelector] - endpoint: Optional[str] - max_payload_size: Optional[str] - metadata: Optional[Dict[str, str]] - method: Optional[str] - port: Optional[str] - server_cert_secret: Optional[v1.SecretKeySelector] - server_key_secret: Optional[v1.SecretKeySelector] - url: Optional[str] - -class WebhookEventSource(BaseModel): - filter: Optional[EventSourceFilter] - webhook_context: Optional[WebhookContext] - -class AMQPEventSource(BaseModel): - auth: Optional[BasicAuth] - connection_backoff: Optional[Backoff] - consume: Optional[AMQPConsumeConfig] - exchange_declare: Optional[AMQPExchangeDeclareConfig] - exchange_name: Optional[str] - exchange_type: Optional[str] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - queue_bind: Optional[AMQPQueueBindConfig] - queue_declare: Optional[AMQPQueueDeclareConfig] - routing_key: Optional[str] - tls: Optional[TLSConfig] - url: Optional[str] - url_secret: Optional[v1.SecretKeySelector] - -class AWSLambdaTrigger(BaseModel): - access_key: Optional[v1.SecretKeySelector] - function_name: Optional[str] - invocation_type: Optional[str] - parameters: Optional[List[TriggerParameter]] - payload: Optional[List[TriggerParameter]] - region: Optional[str] - role_arn: Optional[str] - secret_key: Optional[v1.SecretKeySelector] - -class AzureEventHubsTrigger(BaseModel): - fqdn: Optional[str] - hub_name: Optional[str] - parameters: Optional[List[TriggerParameter]] - payload: Optional[List[TriggerParameter]] - shared_access_key: Optional[v1.SecretKeySelector] - shared_access_key_name: Optional[v1.SecretKeySelector] - -class BitbucketAuth(BaseModel): - basic: Optional[BitbucketBasicAuth] - oauth_token: Optional[v1.SecretKeySelector] - -class BitbucketEventSource(BaseModel): - auth: Optional[BitbucketAuth] - delete_hook_on_finish: Optional[bool] - events: Optional[List[str]] - filter: Optional[EventSourceFilter] - metadata: Optional[Dict[str, str]] - owner: Optional[str] - project_key: Optional[str] - repositories: Optional[List[BitbucketRepository]] - repository_slug: Optional[str] - webhook: Optional[WebhookContext] - -class BitbucketServerEventSource(BaseModel): - access_token: Optional[v1.SecretKeySelector] - bitbucketserver_base_url: Optional[str] - delete_hook_on_finish: Optional[bool] - events: Optional[List[str]] - filter: Optional[EventSourceFilter] - metadata: Optional[Dict[str, str]] - project_key: Optional[str] - repositories: Optional[List[BitbucketServerRepository]] - repository_slug: Optional[str] - webhook: Optional[WebhookContext] - webhook_secret: Optional[v1.SecretKeySelector] - -class CustomTrigger(BaseModel): - cert_secret: Optional[v1.SecretKeySelector] - parameters: Optional[List[TriggerParameter]] - payload: Optional[List[TriggerParameter]] - secure: Optional[bool] - server_name_override: Optional[str] - server_url: Optional[str] - spec: Optional[Dict[str, str]] - -class EmitterEventSource(BaseModel): - broker: Optional[str] - channel_key: Optional[str] - channel_name: Optional[str] - connection_backoff: Optional[Backoff] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - password: Optional[v1.SecretKeySelector] - tls: Optional[TLSConfig] - username: Optional[v1.SecretKeySelector] - -class EventDependencyFilter(BaseModel): - context: Optional[EventContext] - data: Optional[List[DataFilter]] - data_logical_operator: Optional[str] - expr_logical_operator: Optional[str] - exprs: Optional[List[ExprFilter]] - script: Optional[str] - time: Optional[TimeFilter] - -class EventSourceStatus(BaseModel): - status: Optional[Status] - -class GitArtifact(BaseModel): - branch: Optional[str] - clone_directory: Optional[str] - creds: Optional[GitCreds] - file_path: Optional[str] - insecure_ignore_host_key: Optional[bool] - ref: Optional[str] - remote: Optional[GitRemoteConfig] - ssh_key_secret: Optional[v1.SecretKeySelector] - tag: Optional[str] - url: Optional[str] - -class GithubEventSource(BaseModel): - active: Optional[bool] - api_token: Optional[v1.SecretKeySelector] - content_type: Optional[str] - delete_hook_on_finish: Optional[bool] - events: Optional[List[str]] - filter: Optional[EventSourceFilter] - github_app: Optional[GithubAppCreds] - github_base_url: Optional[str] - github_upload_url: Optional[str] - id: Optional[str] - insecure: Optional[bool] - metadata: Optional[Dict[str, str]] - organizations: Optional[List[str]] - owner: Optional[str] - repositories: Optional[List[OwnedRepositories]] - repository: Optional[str] - webhook: Optional[WebhookContext] - webhook_secret: Optional[v1.SecretKeySelector] - -class GitlabEventSource(BaseModel): - access_token: Optional[v1.SecretKeySelector] - delete_hook_on_finish: Optional[bool] - enable_ssl_verification: Optional[bool] - events: Optional[List[str]] - filter: Optional[EventSourceFilter] - gitlab_base_url: Optional[str] - metadata: Optional[Dict[str, str]] - project_id: Optional[str] - projects: Optional[List[str]] - secret_token: Optional[v1.SecretKeySelector] - webhook: Optional[WebhookContext] - -class KafkaEventSource(BaseModel): - config: Optional[str] - connection_backoff: Optional[Backoff] - consumer_group: Optional[KafkaConsumerGroup] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - limit_events_per_second: Optional[str] - metadata: Optional[Dict[str, str]] - partition: Optional[str] - sasl: Optional[SASLConfig] - tls: Optional[TLSConfig] - topic: Optional[str] - url: Optional[str] - version: Optional[str] - -class KafkaTrigger(BaseModel): - compress: Optional[bool] - flush_frequency: Optional[int] - parameters: Optional[List[TriggerParameter]] - partition: Optional[int] - partitioning_key: Optional[str] - payload: Optional[List[TriggerParameter]] - required_acks: Optional[int] - sasl: Optional[SASLConfig] - tls: Optional[TLSConfig] - topic: Optional[str] - url: Optional[str] - version: Optional[str] - -class MQTTEventSource(BaseModel): - client_id: Optional[str] - connection_backoff: Optional[Backoff] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - tls: Optional[TLSConfig] - topic: Optional[str] - url: Optional[str] - -class NATSEventsSource(BaseModel): - auth: Optional[NATSAuth] - connection_backoff: Optional[Backoff] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - subject: Optional[str] - tls: Optional[TLSConfig] - url: Optional[str] - -class NATSTrigger(BaseModel): - parameters: Optional[List[TriggerParameter]] - payload: Optional[List[TriggerParameter]] - subject: Optional[str] - tls: Optional[TLSConfig] - url: Optional[str] - -class NSQEventSource(BaseModel): - channel: Optional[str] - connection_backoff: Optional[Backoff] - filter: Optional[EventSourceFilter] - host_address: Optional[str] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - tls: Optional[TLSConfig] - topic: Optional[str] - -class OpenWhiskTrigger(BaseModel): - action_name: Optional[str] - auth_token: Optional[v1.SecretKeySelector] - host: Optional[str] - namespace: Optional[str] - parameters: Optional[List[TriggerParameter]] - payload: Optional[List[TriggerParameter]] - version: Optional[str] - -class PulsarEventSource(BaseModel): - auth_token_secret: Optional[v1.SecretKeySelector] - connection_backoff: Optional[Backoff] - filter: Optional[EventSourceFilter] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - tls: Optional[TLSConfig] - tls_allow_insecure_connection: Optional[bool] - tls_trust_certs_secret: Optional[v1.SecretKeySelector] - tls_validate_hostname: Optional[bool] - topics: Optional[List[str]] - type: Optional[str] - url: Optional[str] - -class PulsarTrigger(BaseModel): - auth_token_secret: Optional[v1.SecretKeySelector] - connection_backoff: Optional[Backoff] - parameters: Optional[List[TriggerParameter]] - payload: Optional[List[TriggerParameter]] - tls: Optional[TLSConfig] - tls_allow_insecure_connection: Optional[bool] - tls_trust_certs_secret: Optional[v1.SecretKeySelector] - tls_validate_hostname: Optional[bool] - topic: Optional[str] - url: Optional[str] - -class RedisEventSource(BaseModel): - channels: Optional[List[str]] - db: Optional[int] - filter: Optional[EventSourceFilter] - host_address: Optional[str] - json_body: Optional[bool] - metadata: Optional[Dict[str, str]] - namespace: Optional[str] - password: Optional[v1.SecretKeySelector] - tls: Optional[TLSConfig] - username: Optional[str] - -class RedisStreamEventSource(BaseModel): - consumer_group: Optional[str] - db: Optional[int] - filter: Optional[EventSourceFilter] - host_address: Optional[str] - max_msg_count_per_read: Optional[int] - metadata: Optional[Dict[str, str]] - password: Optional[v1.SecretKeySelector] - streams: Optional[List[str]] - tls: Optional[TLSConfig] - username: Optional[str] - -class ResourceEventSource(BaseModel): - event_types: Optional[List[str]] - filter: Optional[ResourceFilter] - group_version_resource: Optional[v1_1.GroupVersionResource] - metadata: Optional[Dict[str, str]] - namespace: Optional[str] - -class SNSEventSource(BaseModel): - access_key: Optional[v1.SecretKeySelector] - endpoint: Optional[str] - filter: Optional[EventSourceFilter] - metadata: Optional[Dict[str, str]] - region: Optional[str] - role_arn: Optional[str] - secret_key: Optional[v1.SecretKeySelector] - topic_arn: Optional[str] - validate_signature: Optional[bool] - webhook: Optional[WebhookContext] - -class SecureHeader(BaseModel): - name: Optional[str] - value_from: Optional[ValueFromSource] - -class SensorStatus(BaseModel): - status: Optional[Status] - -class Service(BaseModel): - cluster_ip: Optional[str] - ports: Optional[List[v1.ServicePort]] - -class SlackEventSource(BaseModel): - filter: Optional[EventSourceFilter] - metadata: Optional[Dict[str, str]] - signing_secret: Optional[v1.SecretKeySelector] - token: Optional[v1.SecretKeySelector] - webhook: Optional[WebhookContext] - -class SlackTrigger(BaseModel): - channel: Optional[str] - message: Optional[str] - parameters: Optional[List[TriggerParameter]] - slack_token: Optional[v1.SecretKeySelector] - -class StorageGridEventSource(BaseModel): - api_url: Optional[str] - auth_token: Optional[v1.SecretKeySelector] - bucket: Optional[str] - events: Optional[List[str]] - filter: Optional[StorageGridFilter] - metadata: Optional[Dict[str, str]] - region: Optional[str] - topic_arn: Optional[str] - webhook: Optional[WebhookContext] - -class StripeEventSource(BaseModel): - api_key: Optional[v1.SecretKeySelector] - create_webhook: Optional[bool] - event_filter: Optional[List[str]] - metadata: Optional[Dict[str, str]] - webhook: Optional[WebhookContext] - -class ArtifactLocation(BaseModel): - configmap: Optional[v1.ConfigMapKeySelector] - file: Optional[FileArtifact] - git: Optional[GitArtifact] - inline: Optional[str] - resource: Optional[Resource] - s3: Optional[S3Artifact] - url: Optional[URLArtifact] - -class EventDependency(BaseModel): - event_name: Optional[str] - event_source_name: Optional[str] - filters: Optional[EventDependencyFilter] - filters_logical_operator: Optional[str] - name: Optional[str] - transform: Optional[EventDependencyTransformer] - -class HTTPTrigger(BaseModel): - basic_auth: Optional[BasicAuth] - headers: Optional[Dict[str, str]] - method: Optional[str] - parameters: Optional[List[TriggerParameter]] - payload: Optional[List[TriggerParameter]] - secure_headers: Optional[List[SecureHeader]] - timeout: Optional[str] - tls: Optional[TLSConfig] - url: Optional[str] - -class StandardK8STrigger(BaseModel): - live_object: Optional[bool] - operation: Optional[str] - parameters: Optional[List[TriggerParameter]] - patch_strategy: Optional[str] - source: Optional[ArtifactLocation] - -class ArgoWorkflowTrigger(BaseModel): - args: Optional[List[str]] - operation: Optional[str] - parameters: Optional[List[TriggerParameter]] - source: Optional[ArtifactLocation] - -class TriggerTemplate(BaseModel): - argo_workflow: Optional[ArgoWorkflowTrigger] - aws_lambda: Optional[AWSLambdaTrigger] - azure_event_hubs: Optional[AzureEventHubsTrigger] - conditions: Optional[str] - conditions_reset: Optional[List[ConditionsResetCriteria]] - custom: Optional[CustomTrigger] - http: Optional[HTTPTrigger] - k8s: Optional[StandardK8STrigger] - kafka: Optional[KafkaTrigger] - log: Optional[LogTrigger] - name: Optional[str] - nats: Optional[NATSTrigger] - open_whisk: Optional[OpenWhiskTrigger] - pulsar: Optional[PulsarTrigger] - slack: Optional[SlackTrigger] - -class Template(BaseModel): - affinity: Optional[v1.Affinity] - container: Optional[v1.Container] - image_pull_secrets: Optional[List[v1.LocalObjectReference]] - metadata: Optional[Metadata] - node_selector: Optional[Dict[str, str]] - priority: Optional[int] - priority_class_name: Optional[str] - security_context: Optional[v1.PodSecurityContext] - service_account_name: Optional[str] - tolerations: Optional[List[v1.Toleration]] - volumes: Optional[List[v1.Volume]] - -class Trigger(BaseModel): - parameters: Optional[List[TriggerParameter]] - policy: Optional[TriggerPolicy] - rate_limit: Optional[RateLimit] - retry_strategy: Optional[Backoff] - template: Optional[TriggerTemplate] - -class EventSourceSpec(BaseModel): - amqp: Optional[Dict[str, AMQPEventSource]] - azure_events_hub: Optional[Dict[str, AzureEventsHubEventSource]] - bitbucket: Optional[Dict[str, BitbucketEventSource]] - bitbucketserver: Optional[Dict[str, BitbucketServerEventSource]] - calendar: Optional[Dict[str, CalendarEventSource]] - emitter: Optional[Dict[str, EmitterEventSource]] - event_bus_name: Optional[str] - file: Optional[Dict[str, FileEventSource]] - generic: Optional[Dict[str, GenericEventSource]] - github: Optional[Dict[str, GithubEventSource]] - gitlab: Optional[Dict[str, GitlabEventSource]] - hdfs: Optional[Dict[str, HDFSEventSource]] - kafka: Optional[Dict[str, KafkaEventSource]] - minio: Optional[Dict[str, S3Artifact]] - mqtt: Optional[Dict[str, MQTTEventSource]] - nats: Optional[Dict[str, NATSEventsSource]] - nsq: Optional[Dict[str, NSQEventSource]] - pub_sub: Optional[Dict[str, PubSubEventSource]] - pulsar: Optional[Dict[str, PulsarEventSource]] - redis: Optional[Dict[str, RedisEventSource]] - redis_stream: Optional[Dict[str, RedisStreamEventSource]] - replicas: Optional[int] - resource: Optional[Dict[str, ResourceEventSource]] - service: Optional[Service] - slack: Optional[Dict[str, SlackEventSource]] - sns: Optional[Dict[str, SNSEventSource]] - sqs: Optional[Dict[str, SQSEventSource]] - storage_grid: Optional[Dict[str, StorageGridEventSource]] - stripe: Optional[Dict[str, StripeEventSource]] - template: Optional[Template] - webhook: Optional[Dict[str, WebhookEventSource]] - -class SensorSpec(BaseModel): - dependencies: Optional[List[EventDependency]] - error_on_failed_round: Optional[bool] - event_bus_name: Optional[str] - replicas: Optional[int] - template: Optional[Template] - triggers: Optional[List[Trigger]] - -class EventSource(BaseModel): - metadata: Optional[v1_1.ObjectMeta] - spec: Optional[EventSourceSpec] - status: Optional[EventSourceStatus] - -class EventSourceList(BaseModel): - items: Optional[List[EventSource]] - metadata: Optional[v1_1.ListMeta] - -class Sensor(BaseModel): - metadata: Optional[v1_1.ObjectMeta] - spec: Optional[SensorSpec] - status: Optional[SensorStatus] - -class SensorList(BaseModel): - items: Optional[List[Sensor]] - metadata: Optional[v1_1.ListMeta] diff --git a/src/hera/events/models/io/argoproj/workflow/__init__.py b/src/hera/events/models/io/argoproj/workflow/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/io/argoproj/workflow/__init__.py +++ b/src/hera/events/models/io/argoproj/workflow/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/io/argoproj/workflow/v1alpha1.py b/src/hera/events/models/io/argoproj/workflow/v1alpha1.py index ed9dbac4d..d5a91172f 100644 --- a/src/hera/events/models/io/argoproj/workflow/v1alpha1.py +++ b/src/hera/events/models/io/argoproj/workflow/v1alpha1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -100,28 +100,6 @@ class ArtifactRepositoryRef(BaseModel): ] = None -class ArtifactResult(BaseModel): - error: Annotated[ - Optional[str], - Field(description=("Error is an optional error message which should be set if" " Success==false")), - ] = None - name: Annotated[str, Field(description="Name is the name of the Artifact")] - success: Annotated[ - Optional[bool], - Field(description="Success describes whether the deletion succeeded"), - ] = None - - -class ArtifactResultNodeStatus(BaseModel): - artifact_results: Annotated[ - Optional[Dict[str, ArtifactResult]], - Field( - alias="artifactResults", - description="ArtifactResults maps Artifact name to result of the deletion", - ), - ] = None - - class ClusterWorkflowTemplateDeleteResponse(BaseModel): pass @@ -174,6 +152,20 @@ class CronWorkflowResumeRequest(BaseModel): namespace: Optional[str] = None +class StopStrategy(BaseModel): + expression: Annotated[ + str, + Field( + description=( + "v3.6 and after: Expression is an expression that stops scheduling" + " workflows when true. Use the variables `cronworkflow`.`failed` or" + " `cronworkflow`.`succeeded` to access the number of failed or" + " successful child workflows." + ) + ), + ] + + class CronWorkflowSuspendRequest(BaseModel): name: Optional[str] = None namespace: Optional[str] = None @@ -634,6 +626,10 @@ class CronWorkflowStatus(BaseModel): Optional[List[Condition]], Field(description="Conditions is a list of conditions the CronWorkflow may have"), ] = None + failed: Annotated[ + int, + Field(description=("v3.6 and after: Failed counts how many times child workflows failed")), + ] last_scheduled_time: Annotated[ Optional[v1_1.Time], Field( @@ -641,6 +637,19 @@ class CronWorkflowStatus(BaseModel): description=("LastScheduleTime is the last time the CronWorkflow was scheduled"), ), ] = None + phase: Annotated[ + str, + Field( + description=( + "v3.6 and after: Phase is an enum of Active or Stopped. It changes to" + " Stopped when stopStrategy.expression is true" + ) + ), + ] + succeeded: Annotated[ + int, + Field(description=("v3.6 and after: Succeeded counts how many times child workflows" " succeeded")), + ] class ArtifactoryArtifact(BaseModel): @@ -849,6 +858,15 @@ class GitArtifact(BaseModel): description=("InsecureIgnoreHostKey disables SSH strict host key checking during git" " clone"), ), ] = None + insecure_skip_tls: Annotated[ + Optional[bool], + Field( + alias="insecureSkipTLS", + description=( + "InsecureSkipTLS disables server certificate verification resulting in" " insecure HTTPS connections" + ), + ), + ] = None password_secret: Annotated[ Optional[v1.SecretKeySelector], Field( @@ -951,6 +969,17 @@ class HDFSArtifact(BaseModel): Optional[List[str]], Field(description="Addresses is accessible addresses of HDFS name nodes"), ] = None + data_transfer_protection: Annotated[ + Optional[str], + Field( + alias="dataTransferProtection", + description=( + "DataTransferProtection is the protection level for HDFS data transfer." + " It corresponds to the dfs.data.transfer.protection configuration in" + " HDFS." + ), + ), + ] = None force: Annotated[ Optional[bool], Field(description="Force copies a file forcibly even if it exists"), @@ -1030,6 +1059,17 @@ class HDFSArtifactRepository(BaseModel): Optional[List[str]], Field(description="Addresses is accessible addresses of HDFS name nodes"), ] = None + data_transfer_protection: Annotated[ + Optional[str], + Field( + alias="dataTransferProtection", + description=( + "DataTransferProtection is the protection level for HDFS data transfer." + " It corresponds to the dfs.data.transfer.protection configuration in" + " HDFS." + ), + ), + ] = None force: Annotated[ Optional[bool], Field(description="Force copies a file forcibly even if it exists"), @@ -1216,7 +1256,13 @@ class Backoff(BaseModel): Field( alias="maxDuration", description=( - "MaxDuration is the maximum amount of time allowed for a workflow in" " the backoff strategy" + "MaxDuration is the maximum amount of time allowed for a workflow in" + " the backoff strategy. It is important to note that if the workflow" + " template includes activeDeadlineSeconds, the pod's deadline is" + " initially set with activeDeadlineSeconds. However, when the workflow" + " fails, the pod's deadline is then overridden by maxDuration. This" + " ensures that the workflow does not exceed the specified maximum" + " duration when retries are involved." ), ), ] = None @@ -1233,7 +1279,16 @@ class ContainerSetRetryStrategy(BaseModel): ) ), ] = None - retries: Annotated[intstr.IntOrString, Field(description="Nbr of retries")] + retries: Annotated[ + intstr.IntOrString, + Field( + description=( + "Retries is the maximum number of retry attempts for each container. It" + " does not include the first, original attempt; the maximum number of" + " total attempts will be `retries + 1`." + ) + ), + ] class Sequence(BaseModel): @@ -1612,6 +1667,15 @@ class S3Artifact(BaseModel): description=("SecretKeySecret is the secret selector to the bucket's secret key"), ), ] = None + session_token_secret: Annotated[ + Optional[v1.SecretKeySelector], + Field( + alias="sessionTokenSecret", + description=( + "SessionTokenSecret is used for ephemeral credentials like an IAM" " assume role or S3 access grant" + ), + ), + ] = None use_sdk_creds: Annotated[ Optional[bool], Field( @@ -1690,6 +1754,15 @@ class S3ArtifactRepository(BaseModel): description=("SecretKeySecret is the secret selector to the bucket's secret key"), ), ] = None + session_token_secret: Annotated[ + Optional[v1.SecretKeySelector], + Field( + alias="sessionTokenSecret", + description=( + "SessionTokenSecret is used for ephemeral credentials like an IAM" " assume role or S3 access grant" + ), + ), + ] = None use_sdk_creds: Annotated[ Optional[bool], Field( @@ -1716,10 +1789,21 @@ class Memoize(BaseModel): class Synchronization(BaseModel): - mutex: Annotated[Optional[Mutex], Field(description="Mutex holds the Mutex lock details")] = None + mutex: Annotated[ + Optional[Mutex], + Field(description=("Mutex holds the Mutex lock details - deprecated, use mutexes instead")), + ] = None + mutexes: Annotated[ + Optional[List[Mutex]], + Field(description="v3.6 and after: Mutexes holds the list of Mutex lock details"), + ] = None semaphore: Annotated[ Optional[SemaphoreRef], - Field(description="Semaphore holds the Semaphore configuration"), + Field(description=("Semaphore holds the Semaphore configuration - deprecated, use" " semaphores instead")), + ] = None + semaphores: Annotated[ + Optional[List[SemaphoreRef]], + Field(description=("v3.6 and after: Semaphores holds the list of Semaphores configuration")), ] = None @@ -2181,20 +2265,6 @@ class ManifestFrom(BaseModel): artifact: Annotated[Artifact, Field(description="Artifact contains the artifact to use")] -class ArtifactNodeSpec(BaseModel): - archive_location: Annotated[ - Optional[ArtifactLocation], - Field( - alias="archiveLocation", - description=("ArchiveLocation is the template-level Artifact location specification"), - ), - ] = None - artifacts: Annotated[ - Optional[Dict[str, Artifact]], - Field(description="Artifacts maps artifact name to Artifact description"), - ] = None - - class DataSource(BaseModel): artifact_paths: Annotated[ Optional[ArtifactPaths], @@ -2298,26 +2368,6 @@ class Arguments(BaseModel): ] = None -class ArtifactGCSpec(BaseModel): - artifacts_by_node: Annotated[ - Optional[Dict[str, ArtifactNodeSpec]], - Field( - alias="artifactsByNode", - description=("ArtifactsByNode maps Node name to information pertaining to Artifacts" " on that Node"), - ), - ] = None - - -class ArtifactGCStatus(BaseModel): - artifact_results_by_node: Annotated[ - Optional[Dict[str, ArtifactResultNodeStatus]], - Field( - alias="artifactResultsByNode", - description="ArtifactResultsByNode maps Node name to result", - ), - ] = None - - class InfoResponse(BaseModel): columns: Optional[List[Column]] = None links: Optional[List[Link]] = None @@ -2434,13 +2484,6 @@ class HTTP(BaseModel): url: Annotated[str, Field(description="URL of the HTTP Request")] -class NodeResult(BaseModel): - message: Optional[str] = None - outputs: Optional[Outputs] = None - phase: Optional[str] = None - progress: Optional[str] = None - - class NodeStatus(BaseModel): boundary_id: Annotated[ Optional[str], @@ -2627,7 +2670,7 @@ class NodeStatus(BaseModel): class PodGC(BaseModel): delete_delay_duration: Annotated[ - Optional[v1_1.Duration], + Optional[str], Field( alias="deleteDelayDuration", description=("DeleteDelayDuration specifies the duration before pods in the GC queue" " get deleted."), @@ -2818,12 +2861,13 @@ class ContainerNode(BaseModel): Optional[List[v1.ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -2839,6 +2883,13 @@ class ContainerNode(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[v1.ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[v1.ResourceRequirements], Field( @@ -2849,6 +2900,30 @@ class ContainerNode(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[v1.SecurityContext], Field( @@ -3079,12 +3154,13 @@ class ScriptTemplate(BaseModel): Optional[List[v1.ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -3100,6 +3176,13 @@ class ScriptTemplate(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[v1.ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[v1.ResourceRequirements], Field( @@ -3110,6 +3193,30 @@ class ScriptTemplate(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[v1.SecurityContext], Field( @@ -3357,12 +3464,13 @@ class UserContainer(BaseModel): Optional[List[v1.ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -3378,6 +3486,13 @@ class UserContainer(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[v1.ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[v1.ResourceRequirements], Field( @@ -3388,6 +3503,30 @@ class UserContainer(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[v1.SecurityContext], Field( @@ -3509,10 +3648,6 @@ class UserContainer(BaseModel): ] = None -class WorkflowTaskSetStatus(BaseModel): - nodes: Optional[Dict[str, NodeResult]] = None - - class WorkflowEventBindingList(BaseModel): api_version: Annotated[ Optional[str], @@ -3548,9 +3683,10 @@ class ContainerSetTemplate(BaseModel): Field( alias="retryStrategy", description=( - "RetryStrategy describes how to retry a container nodes in the" - " container set if it fails. Nbr of retries(default 0) and sleep" - " duration between retries(default 0s, instant retry) can be set." + "RetryStrategy describes how to retry container nodes if the container" + " set fails. Note that this works differently from the template-level" + " `retryStrategy` as it is a process-level retry that does not create" + " new Pods or containers." ), ), ] = None @@ -3586,10 +3722,6 @@ class ParallelSteps(BaseModel): __root__: List[WorkflowStep] -class WorkflowTaskSetSpec(BaseModel): - tasks: Optional[Dict[str, Template]] = None - - class ClusterWorkflowTemplateList(BaseModel): api_version: Annotated[ Optional[str], @@ -4129,11 +4261,11 @@ class WorkflowSpec(BaseModel): Field( alias="dnsPolicy", description=( - 'Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values' - " are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or" - " 'None'. DNS parameters given in DNSConfig will be merged with the" - " policy selected with DNSPolicy. To have DNS options set along with" - " hostNetwork, you have to specify DNS policy explicitly to" + 'Set DNS policy for workflow pods. Defaults to "ClusterFirst". Valid' + " values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default'" + " or 'None'. DNS parameters given in DNSConfig will be merged with" + " the policy selected with DNSPolicy. To have DNS options set along" + " with hostNetwork, you have to specify DNS policy explicitly to" " 'ClusterFirstWithHostNet'." ), ), @@ -4537,9 +4669,13 @@ class CronWorkflowSpec(BaseModel): ), ] = None schedule: Annotated[ - str, - Field(description="Schedule is a schedule to run the Workflow in Cron format"), - ] + Optional[str], + Field(description=("Schedule is a schedule to run the Workflow in Cron format. Deprecated," " use Schedules")), + ] = None + schedules: Annotated[ + Optional[List[str]], + Field(description=("v3.6 and after: Schedules is a list of schedules to run the Workflow" " in Cron format")), + ] = None starting_deadline_seconds: Annotated[ Optional[int], Field( @@ -4551,6 +4687,16 @@ class CronWorkflowSpec(BaseModel): ), ), ] = None + stop_strategy: Annotated[ + Optional[StopStrategy], + Field( + alias="stopStrategy", + description=( + "v3.6 and after: StopStrategy defines if the CronWorkflow should stop" + " scheduling based on a condition" + ), + ), + ] = None successful_jobs_history_limit: Annotated[ Optional[int], Field( @@ -4571,6 +4717,10 @@ class CronWorkflowSpec(BaseModel): ) ), ] = None + when: Annotated[ + Optional[str], + Field(description=("v3.6 and after: When is an expression that determines if a run should" " be scheduled.")), + ] = None workflow_metadata: Annotated[ Optional[v1_1.ObjectMeta], Field( @@ -4877,7 +5027,6 @@ class WorkflowWatchEvent(BaseModel): DAGTemplate.update_forward_refs() ParallelSteps.update_forward_refs() -WorkflowTaskSetSpec.update_forward_refs() ClusterWorkflowTemplateList.update_forward_refs() CronWorkflowList.update_forward_refs() WorkflowList.update_forward_refs() diff --git a/src/hera/events/models/io/argoproj/workflow/v1alpha1.pyi b/src/hera/events/models/io/argoproj/workflow/v1alpha1.pyi deleted file mode 100644 index 09c3fff3b..000000000 --- a/src/hera/events/models/io/argoproj/workflow/v1alpha1.pyi +++ /dev/null @@ -1,1087 +0,0 @@ -from typing import Any, Dict, List, Optional - -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -from ...k8s.api.core import v1 as v1 -from ...k8s.api.policy import v1beta1 as v1beta1 -from ...k8s.apimachinery.pkg.apis.meta import v1 as v1_1 -from ...k8s.apimachinery.pkg.util import intstr as intstr - -class Amount(BaseModel): - __root__: float - -class ArchivedWorkflowDeletedResponse(BaseModel): ... - -class ArtGCStatus(BaseModel): - not_specified: Optional[bool] - pods_recouped: Optional[Dict[str, bool]] - strategies_processed: Optional[Dict[str, bool]] - -class ArtifactRepositoryRef(BaseModel): - config_map: Optional[str] - key: Optional[str] - -class ArtifactResult(BaseModel): - error: Optional[str] - name: str - success: Optional[bool] - -class ArtifactResultNodeStatus(BaseModel): - artifact_results: Optional[Dict[str, ArtifactResult]] - -class ClusterWorkflowTemplateDeleteResponse(BaseModel): ... - -class CollectEventRequest(BaseModel): - name: Optional[str] - -class CollectEventResponse(BaseModel): ... - -class Condition(BaseModel): - message: Optional[str] - status: Optional[str] - type: Optional[str] - -class ContinueOn(BaseModel): - error: Optional[bool] - failed: Optional[bool] - -class Counter(BaseModel): - value: str - -class CreateS3BucketOptions(BaseModel): - object_locking: Optional[bool] - -class CronWorkflowDeletedResponse(BaseModel): ... - -class CronWorkflowResumeRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - -class CronWorkflowSuspendRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - -class Event(BaseModel): - selector: str - -class EventResponse(BaseModel): ... - -class ExecutorConfig(BaseModel): - service_account_name: Optional[str] - -class Gauge(BaseModel): - realtime: bool - value: str - -class GetUserInfoResponse(BaseModel): - email: Optional[str] - email_verified: Optional[bool] - groups: Optional[List[str]] - issuer: Optional[str] - service_account_name: Optional[str] - service_account_namespace: Optional[str] - subject: Optional[str] - -class HTTPBodySource(BaseModel): - bytes: Optional[str] - -class Header(BaseModel): - name: str - value: str - -class Histogram(BaseModel): - buckets: List[Amount] - value: str - -class Item(BaseModel): - __root__: Any - -class LabelKeys(BaseModel): - items: Optional[List[str]] - -class LabelValueFrom(BaseModel): - expression: str - -class LabelValues(BaseModel): - items: Optional[List[str]] - -class Link(BaseModel): - name: str - scope: str - url: str - -class LogEntry(BaseModel): - content: Optional[str] - pod_name: Optional[str] - -class MemoizationStatus(BaseModel): - cache_name: str - hit: bool - key: str - -class Metadata(BaseModel): - annotations: Optional[Dict[str, str]] - labels: Optional[Dict[str, str]] - -class MetricLabel(BaseModel): - key: str - value: str - -class Mutex(BaseModel): - name: Optional[str] - -class MutexHolding(BaseModel): - holder: Optional[str] - mutex: Optional[str] - -class MutexStatus(BaseModel): - holding: Optional[List[MutexHolding]] - waiting: Optional[List[MutexHolding]] - -class NodeSynchronizationStatus(BaseModel): - waiting: Optional[str] - -class NoneStrategy(BaseModel): ... - -class OAuth2EndpointParam(BaseModel): - key: str - value: Optional[str] - -class OSSLifecycleRule(BaseModel): - mark_deletion_after_days: Optional[int] - mark_infrequent_access_after_days: Optional[int] - -class Plugin(BaseModel): ... - -class Prometheus(BaseModel): - counter: Optional[Counter] - gauge: Optional[Gauge] - help: str - histogram: Optional[Histogram] - labels: Optional[List[MetricLabel]] - name: str - when: Optional[str] - -class RawArtifact(BaseModel): - data: str - -class ResubmitArchivedWorkflowRequest(BaseModel): - memoized: Optional[bool] - name: Optional[str] - namespace: Optional[str] - parameters: Optional[List[str]] - uid: Optional[str] - -class RetryArchivedWorkflowRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - node_field_selector: Optional[str] - parameters: Optional[List[str]] - restart_successful: Optional[bool] - uid: Optional[str] - -class RetryNodeAntiAffinity(BaseModel): ... - -class SemaphoreHolding(BaseModel): - holders: Optional[List[str]] - semaphore: Optional[str] - -class SemaphoreStatus(BaseModel): - holding: Optional[List[SemaphoreHolding]] - waiting: Optional[List[SemaphoreHolding]] - -class SuppliedValueFrom(BaseModel): ... - -class SuspendTemplate(BaseModel): - duration: Optional[str] - -class SynchronizationStatus(BaseModel): - mutex: Optional[MutexStatus] - semaphore: Optional[SemaphoreStatus] - -class TTLStrategy(BaseModel): - seconds_after_completion: Optional[int] - seconds_after_failure: Optional[int] - seconds_after_success: Optional[int] - -class TarStrategy(BaseModel): - compression_level: Optional[int] - -class TemplateRef(BaseModel): - cluster_scope: Optional[bool] - name: Optional[str] - template: Optional[str] - -class TransformationStep(BaseModel): - expression: str - -class Version(BaseModel): - build_date: str - compiler: str - git_commit: str - git_tag: str - git_tree_state: str - go_version: str - platform: str - version: str - -class VolumeClaimGC(BaseModel): - strategy: Optional[str] - -class WorkflowDeleteResponse(BaseModel): ... - -class WorkflowMetadata(BaseModel): - annotations: Optional[Dict[str, str]] - labels: Optional[Dict[str, str]] - labels_from: Optional[Dict[str, LabelValueFrom]] - -class WorkflowResubmitRequest(BaseModel): - memoized: Optional[bool] - name: Optional[str] - namespace: Optional[str] - parameters: Optional[List[str]] - -class WorkflowResumeRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - node_field_selector: Optional[str] - -class WorkflowRetryRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - node_field_selector: Optional[str] - parameters: Optional[List[str]] - restart_successful: Optional[bool] - -class WorkflowSetRequest(BaseModel): - message: Optional[str] - name: Optional[str] - namespace: Optional[str] - node_field_selector: Optional[str] - output_parameters: Optional[str] - phase: Optional[str] - -class WorkflowStopRequest(BaseModel): - message: Optional[str] - name: Optional[str] - namespace: Optional[str] - node_field_selector: Optional[str] - -class WorkflowSuspendRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - -class WorkflowTemplateDeleteResponse(BaseModel): ... - -class WorkflowTemplateRef(BaseModel): - cluster_scope: Optional[bool] - name: Optional[str] - -class WorkflowTerminateRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - -class ZipStrategy(BaseModel): ... - -class ArchiveStrategy(BaseModel): - none: Optional[NoneStrategy] - tar: Optional[TarStrategy] - zip: Optional[ZipStrategy] - -class ArtifactGC(BaseModel): - pod_metadata: Optional[Metadata] - service_account_name: Optional[str] - strategy: Optional[str] - -class ArtifactGCStatus(BaseModel): - artifact_results_by_node: Optional[Dict[str, ArtifactResultNodeStatus]] - -class ArtifactoryArtifact(BaseModel): - password_secret: Optional[v1.SecretKeySelector] - url: str - username_secret: Optional[v1.SecretKeySelector] - -class ArtifactoryArtifactRepository(BaseModel): - password_secret: Optional[v1.SecretKeySelector] - repo_url: Optional[str] - username_secret: Optional[v1.SecretKeySelector] - -class AzureArtifact(BaseModel): - account_key_secret: Optional[v1.SecretKeySelector] - blob: str - container: str - endpoint: str - use_sdk_creds: Optional[bool] - -class AzureArtifactRepository(BaseModel): - account_key_secret: Optional[v1.SecretKeySelector] - blob_name_format: Optional[str] - container: str - endpoint: str - use_sdk_creds: Optional[bool] - -class Backoff(BaseModel): - duration: Optional[str] - factor: Optional[intstr.IntOrString] - max_duration: Optional[str] - -class BasicAuth(BaseModel): - password_secret: Optional[v1.SecretKeySelector] - username_secret: Optional[v1.SecretKeySelector] - -class Cache(BaseModel): - config_map: v1.ConfigMapKeySelector - -class ClientCertAuth(BaseModel): - client_cert_secret: Optional[v1.SecretKeySelector] - client_key_secret: Optional[v1.SecretKeySelector] - -class ContainerSetRetryStrategy(BaseModel): - duration: Optional[str] - retries: intstr.IntOrString - -class CronWorkflowStatus(BaseModel): - active: Optional[List[v1.ObjectReference]] - conditions: Optional[List[Condition]] - last_scheduled_time: Optional[v1_1.Time] - -class GCSArtifact(BaseModel): - bucket: Optional[str] - key: str - service_account_key_secret: Optional[v1.SecretKeySelector] - -class GCSArtifactRepository(BaseModel): - bucket: Optional[str] - key_format: Optional[str] - service_account_key_secret: Optional[v1.SecretKeySelector] - -class GitArtifact(BaseModel): - branch: Optional[str] - depth: Optional[int] - disable_submodules: Optional[bool] - fetch: Optional[List[str]] - insecure_ignore_host_key: Optional[bool] - password_secret: Optional[v1.SecretKeySelector] - repo: str - revision: Optional[str] - single_branch: Optional[bool] - ssh_private_key_secret: Optional[v1.SecretKeySelector] - username_secret: Optional[v1.SecretKeySelector] - -class HDFSArtifact(BaseModel): - addresses: Optional[List[str]] - force: Optional[bool] - hdfs_user: Optional[str] - krb_c_cache_secret: Optional[v1.SecretKeySelector] - krb_config_config_map: Optional[v1.ConfigMapKeySelector] - krb_keytab_secret: Optional[v1.SecretKeySelector] - krb_realm: Optional[str] - krb_service_principal_name: Optional[str] - krb_username: Optional[str] - path: str - -class HDFSArtifactRepository(BaseModel): - addresses: Optional[List[str]] - force: Optional[bool] - hdfs_user: Optional[str] - krb_c_cache_secret: Optional[v1.SecretKeySelector] - krb_config_config_map: Optional[v1.ConfigMapKeySelector] - krb_keytab_secret: Optional[v1.SecretKeySelector] - krb_realm: Optional[str] - krb_service_principal_name: Optional[str] - krb_username: Optional[str] - path_format: Optional[str] - -class HTTPHeaderSource(BaseModel): - secret_key_ref: Optional[v1.SecretKeySelector] - -class InfoResponse(BaseModel): - links: Optional[List[Link]] - managed_namespace: Optional[str] - modals: Optional[Dict[str, bool]] - nav_color: Optional[str] - -class Memoize(BaseModel): - cache: Cache - key: str - max_age: str - -class Metrics(BaseModel): - prometheus: Optional[List[Prometheus]] - -class OAuth2Auth(BaseModel): - client_id_secret: Optional[v1.SecretKeySelector] - client_secret_secret: Optional[v1.SecretKeySelector] - endpoint_params: Optional[List[OAuth2EndpointParam]] - scopes: Optional[List[str]] - token_url_secret: Optional[v1.SecretKeySelector] - -class OSSArtifact(BaseModel): - access_key_secret: Optional[v1.SecretKeySelector] - bucket: Optional[str] - create_bucket_if_not_present: Optional[bool] - endpoint: Optional[str] - key: str - lifecycle_rule: Optional[OSSLifecycleRule] - secret_key_secret: Optional[v1.SecretKeySelector] - security_token: Optional[str] - -class OSSArtifactRepository(BaseModel): - access_key_secret: Optional[v1.SecretKeySelector] - bucket: Optional[str] - create_bucket_if_not_present: Optional[bool] - endpoint: Optional[str] - key_format: Optional[str] - lifecycle_rule: Optional[OSSLifecycleRule] - secret_key_secret: Optional[v1.SecretKeySelector] - security_token: Optional[str] - -class RetryAffinity(BaseModel): - node_anti_affinity: Optional[RetryNodeAntiAffinity] - -class RetryStrategy(BaseModel): - affinity: Optional[RetryAffinity] - backoff: Optional[Backoff] - expression: Optional[str] - limit: Optional[intstr.IntOrString] - retry_policy: Optional[str] - -class S3EncryptionOptions(BaseModel): - enable_encryption: Optional[bool] - kms_encryption_context: Optional[str] - kms_key_id: Optional[str] - server_side_customer_key_secret: Optional[v1.SecretKeySelector] - -class SemaphoreRef(BaseModel): - config_map_key_ref: Optional[v1.ConfigMapKeySelector] - -class Sequence(BaseModel): - count: Optional[intstr.IntOrString] - end: Optional[intstr.IntOrString] - format: Optional[str] - start: Optional[intstr.IntOrString] - -class SubmitOpts(BaseModel): - annotations: Optional[str] - dry_run: Optional[bool] - entry_point: Optional[str] - generate_name: Optional[str] - labels: Optional[str] - name: Optional[str] - owner_reference: Optional[v1_1.OwnerReference] - parameters: Optional[List[str]] - pod_priority_class_name: Optional[str] - priority: Optional[int] - server_dry_run: Optional[bool] - service_account: Optional[str] - -class Synchronization(BaseModel): - mutex: Optional[Mutex] - semaphore: Optional[SemaphoreRef] - -class ValueFrom(BaseModel): - config_map_key_ref: Optional[v1.ConfigMapKeySelector] - default: Optional[str] - event: Optional[str] - expression: Optional[str] - jq_filter: Optional[str] - json_path: Optional[str] - parameter: Optional[str] - path: Optional[str] - supplied: Optional[SuppliedValueFrom] - -class WorkflowSubmitRequest(BaseModel): - namespace: Optional[str] - resource_kind: Optional[str] - resource_name: Optional[str] - submit_options: Optional[SubmitOpts] - -class HTTPAuth(BaseModel): - basic_auth: Optional[BasicAuth] - client_cert: Optional[ClientCertAuth] - oauth2: Optional[OAuth2Auth] - -class HTTPHeader(BaseModel): - name: str - value: Optional[str] - value_from: Optional[HTTPHeaderSource] - -class Parameter(BaseModel): - default: Optional[str] - description: Optional[str] - enum: Optional[List[str]] - global_name: Optional[str] - name: str - value: Optional[str] - value_from: Optional[ValueFrom] - -class PodGC(BaseModel): - label_selector: Optional[v1_1.LabelSelector] - strategy: Optional[str] - -class S3Artifact(BaseModel): - access_key_secret: Optional[v1.SecretKeySelector] - bucket: Optional[str] - create_bucket_if_not_present: Optional[CreateS3BucketOptions] - encryption_options: Optional[S3EncryptionOptions] - endpoint: Optional[str] - insecure: Optional[bool] - key: Optional[str] - region: Optional[str] - role_arn: Optional[str] - secret_key_secret: Optional[v1.SecretKeySelector] - use_sdk_creds: Optional[bool] - -class S3ArtifactRepository(BaseModel): - access_key_secret: Optional[v1.SecretKeySelector] - bucket: Optional[str] - create_bucket_if_not_present: Optional[CreateS3BucketOptions] - encryption_options: Optional[S3EncryptionOptions] - endpoint: Optional[str] - insecure: Optional[bool] - key_format: Optional[str] - key_prefix: Optional[str] - region: Optional[str] - role_arn: Optional[str] - secret_key_secret: Optional[v1.SecretKeySelector] - use_sdk_creds: Optional[bool] - -class ArtifactRepository(BaseModel): - archive_logs: Optional[bool] - artifactory: Optional[ArtifactoryArtifactRepository] - azure: Optional[AzureArtifactRepository] - gcs: Optional[GCSArtifactRepository] - hdfs: Optional[HDFSArtifactRepository] - oss: Optional[OSSArtifactRepository] - s3: Optional[S3ArtifactRepository] - -class ArtifactRepositoryRefStatus(BaseModel): - artifact_repository: Optional[ArtifactRepository] - config_map: Optional[str] - default: Optional[bool] - key: Optional[str] - namespace: Optional[str] - -class HTTP(BaseModel): - body: Optional[str] - body_from: Optional[HTTPBodySource] - headers: Optional[List[HTTPHeader]] - insecure_skip_verify: Optional[bool] - method: Optional[str] - success_condition: Optional[str] - timeout_seconds: Optional[int] - url: str - -class HTTPArtifact(BaseModel): - auth: Optional[HTTPAuth] - headers: Optional[List[Header]] - url: str - -class Artifact(BaseModel): - archive: Optional[ArchiveStrategy] - archive_logs: Optional[bool] - artifact_gc: Optional[ArtifactGC] - artifactory: Optional[ArtifactoryArtifact] - azure: Optional[AzureArtifact] - deleted: Optional[bool] - from_: Optional[str] - from_expression: Optional[str] - gcs: Optional[GCSArtifact] - git: Optional[GitArtifact] - global_name: Optional[str] - hdfs: Optional[HDFSArtifact] - http: Optional[HTTPArtifact] - mode: Optional[int] - name: str - optional: Optional[bool] - oss: Optional[OSSArtifact] - path: Optional[str] - raw: Optional[RawArtifact] - recurse_mode: Optional[bool] - s3: Optional[S3Artifact] - sub_path: Optional[str] - -class ArtifactLocation(BaseModel): - archive_logs: Optional[bool] - artifactory: Optional[ArtifactoryArtifact] - azure: Optional[AzureArtifact] - gcs: Optional[GCSArtifact] - git: Optional[GitArtifact] - hdfs: Optional[HDFSArtifact] - http: Optional[HTTPArtifact] - oss: Optional[OSSArtifact] - raw: Optional[RawArtifact] - s3: Optional[S3Artifact] - -class ArtifactNodeSpec(BaseModel): - archive_location: Optional[ArtifactLocation] - artifacts: Optional[Dict[str, Artifact]] - -class ArtifactPaths(BaseModel): - archive: Optional[ArchiveStrategy] - archive_logs: Optional[bool] - artifact_gc: Optional[ArtifactGC] - artifactory: Optional[ArtifactoryArtifact] - azure: Optional[AzureArtifact] - deleted: Optional[bool] - from_: Optional[str] - from_expression: Optional[str] - gcs: Optional[GCSArtifact] - git: Optional[GitArtifact] - global_name: Optional[str] - hdfs: Optional[HDFSArtifact] - http: Optional[HTTPArtifact] - mode: Optional[int] - name: str - optional: Optional[bool] - oss: Optional[OSSArtifact] - path: Optional[str] - raw: Optional[RawArtifact] - recurse_mode: Optional[bool] - s3: Optional[S3Artifact] - sub_path: Optional[str] - -class ContainerNode(BaseModel): - args: Optional[List[str]] - command: Optional[List[str]] - dependencies: Optional[List[str]] - env: Optional[List[v1.EnvVar]] - env_from: Optional[List[v1.EnvFromSource]] - image: Optional[str] - image_pull_policy: Optional[str] - lifecycle: Optional[v1.Lifecycle] - liveness_probe: Optional[v1.Probe] - name: str - ports: Optional[List[v1.ContainerPort]] - readiness_probe: Optional[v1.Probe] - resources: Optional[v1.ResourceRequirements] - security_context: Optional[v1.SecurityContext] - startup_probe: Optional[v1.Probe] - stdin: Optional[bool] - stdin_once: Optional[bool] - termination_message_path: Optional[str] - termination_message_policy: Optional[str] - tty: Optional[bool] - volume_devices: Optional[List[v1.VolumeDevice]] - volume_mounts: Optional[List[v1.VolumeMount]] - working_dir: Optional[str] - -class ContainerSetTemplate(BaseModel): - containers: List[ContainerNode] - retry_strategy: Optional[ContainerSetRetryStrategy] - volume_mounts: Optional[List[v1.VolumeMount]] - -class DataSource(BaseModel): - artifact_paths: Optional[ArtifactPaths] - -class Inputs(BaseModel): - artifacts: Optional[List[Artifact]] - parameters: Optional[List[Parameter]] - -class ManifestFrom(BaseModel): - artifact: Artifact - -class Outputs(BaseModel): - artifacts: Optional[List[Artifact]] - exit_code: Optional[str] - parameters: Optional[List[Parameter]] - result: Optional[str] - -class ResourceTemplate(BaseModel): - action: str - failure_condition: Optional[str] - flags: Optional[List[str]] - manifest: Optional[str] - manifest_from: Optional[ManifestFrom] - merge_strategy: Optional[str] - set_owner_reference: Optional[bool] - success_condition: Optional[str] - -class ScriptTemplate(BaseModel): - args: Optional[List[str]] - command: Optional[List[str]] - env: Optional[List[v1.EnvVar]] - env_from: Optional[List[v1.EnvFromSource]] - image: str - image_pull_policy: Optional[str] - lifecycle: Optional[v1.Lifecycle] - liveness_probe: Optional[v1.Probe] - name: Optional[str] - ports: Optional[List[v1.ContainerPort]] - readiness_probe: Optional[v1.Probe] - resources: Optional[v1.ResourceRequirements] - security_context: Optional[v1.SecurityContext] - source: str - startup_probe: Optional[v1.Probe] - stdin: Optional[bool] - stdin_once: Optional[bool] - termination_message_path: Optional[str] - termination_message_policy: Optional[str] - tty: Optional[bool] - volume_devices: Optional[List[v1.VolumeDevice]] - volume_mounts: Optional[List[v1.VolumeMount]] - working_dir: Optional[str] - -class UserContainer(BaseModel): - args: Optional[List[str]] - command: Optional[List[str]] - env: Optional[List[v1.EnvVar]] - env_from: Optional[List[v1.EnvFromSource]] - image: Optional[str] - image_pull_policy: Optional[str] - lifecycle: Optional[v1.Lifecycle] - liveness_probe: Optional[v1.Probe] - mirror_volume_mounts: Optional[bool] - name: str - ports: Optional[List[v1.ContainerPort]] - readiness_probe: Optional[v1.Probe] - resources: Optional[v1.ResourceRequirements] - security_context: Optional[v1.SecurityContext] - startup_probe: Optional[v1.Probe] - stdin: Optional[bool] - stdin_once: Optional[bool] - termination_message_path: Optional[str] - termination_message_policy: Optional[str] - tty: Optional[bool] - volume_devices: Optional[List[v1.VolumeDevice]] - volume_mounts: Optional[List[v1.VolumeMount]] - working_dir: Optional[str] - -class Arguments(BaseModel): - artifacts: Optional[List[Artifact]] - parameters: Optional[List[Parameter]] - -class ArtifactGCSpec(BaseModel): - artifacts_by_node: Optional[Dict[str, ArtifactNodeSpec]] - -class Data(BaseModel): - source: DataSource - transformation: List[TransformationStep] - -class LifecycleHook(BaseModel): - arguments: Optional[Arguments] - expression: Optional[str] - template: Optional[str] - template_ref: Optional[TemplateRef] - -class NodeResult(BaseModel): - message: Optional[str] - outputs: Optional[Outputs] - phase: Optional[str] - progress: Optional[str] - -class NodeStatus(BaseModel): - boundary_id: Optional[str] - children: Optional[List[str]] - daemoned: Optional[bool] - display_name: Optional[str] - estimated_duration: Optional[int] - finished_at: Optional[v1_1.Time] - host_node_name: Optional[str] - id: str - inputs: Optional[Inputs] - memoization_status: Optional[MemoizationStatus] - message: Optional[str] - name: str - outbound_nodes: Optional[List[str]] - outputs: Optional[Outputs] - phase: Optional[str] - pod_ip: Optional[str] - progress: Optional[str] - resources_duration: Optional[Dict[str, int]] - started_at: Optional[v1_1.Time] - synchronization_status: Optional[NodeSynchronizationStatus] - template_name: Optional[str] - template_ref: Optional[TemplateRef] - template_scope: Optional[str] - type: str - -class Submit(BaseModel): - arguments: Optional[Arguments] - metadata: Optional[v1_1.ObjectMeta] - workflow_template_ref: WorkflowTemplateRef - -class WorkflowEventBindingSpec(BaseModel): - event: Event - submit: Optional[Submit] - -class WorkflowTaskSetStatus(BaseModel): - nodes: Optional[Dict[str, NodeResult]] - -class WorkflowEventBinding(BaseModel): - api_version: Optional[str] - kind: Optional[str] - metadata: v1_1.ObjectMeta - spec: WorkflowEventBindingSpec - -class WorkflowEventBindingList(BaseModel): - api_version: Optional[str] - items: Optional[List[WorkflowEventBinding]] - kind: Optional[str] - metadata: v1_1.ListMeta - -class ClusterWorkflowTemplate(BaseModel): - api_version: Optional[str] - kind: Optional[str] - metadata: v1_1.ObjectMeta - spec: WorkflowSpec - -class ClusterWorkflowTemplateCreateRequest(BaseModel): - create_options: Optional[v1_1.CreateOptions] - template: Optional[ClusterWorkflowTemplate] - -class ClusterWorkflowTemplateLintRequest(BaseModel): - create_options: Optional[v1_1.CreateOptions] - template: Optional[ClusterWorkflowTemplate] - -class ClusterWorkflowTemplateList(BaseModel): - api_version: Optional[str] - items: Optional[List[ClusterWorkflowTemplate]] - kind: Optional[str] - metadata: v1_1.ListMeta - -class ClusterWorkflowTemplateUpdateRequest(BaseModel): - name: Optional[str] - template: Optional[ClusterWorkflowTemplate] - -class CreateCronWorkflowRequest(BaseModel): - create_options: Optional[v1_1.CreateOptions] - cron_workflow: Optional[CronWorkflow] - namespace: Optional[str] - -class CronWorkflow(BaseModel): - api_version: Optional[str] - kind: Optional[str] - metadata: v1_1.ObjectMeta - spec: CronWorkflowSpec - status: Optional[CronWorkflowStatus] - -class CronWorkflowList(BaseModel): - api_version: Optional[str] - items: Optional[List[CronWorkflow]] - kind: Optional[str] - metadata: v1_1.ListMeta - -class CronWorkflowSpec(BaseModel): - concurrency_policy: Optional[str] - failed_jobs_history_limit: Optional[int] - schedule: str - starting_deadline_seconds: Optional[int] - successful_jobs_history_limit: Optional[int] - suspend: Optional[bool] - timezone: Optional[str] - workflow_metadata: Optional[v1_1.ObjectMeta] - workflow_spec: WorkflowSpec - -class DAGTask(BaseModel): - arguments: Optional[Arguments] - continue_on: Optional[ContinueOn] - dependencies: Optional[List[str]] - depends: Optional[str] - hooks: Optional[Dict[str, LifecycleHook]] - inline: Optional[Template] - name: str - on_exit: Optional[str] - template: Optional[str] - template_ref: Optional[TemplateRef] - when: Optional[str] - with_items: Optional[List[Item]] - with_param: Optional[str] - with_sequence: Optional[Sequence] - -class DAGTemplate(BaseModel): - fail_fast: Optional[bool] - target: Optional[str] - tasks: List[DAGTask] - -class LintCronWorkflowRequest(BaseModel): - cron_workflow: Optional[CronWorkflow] - namespace: Optional[str] - -class ParallelSteps(BaseModel): - __root__: List[WorkflowStep] - -class Template(BaseModel): - active_deadline_seconds: Optional[intstr.IntOrString] - affinity: Optional[v1.Affinity] - archive_location: Optional[ArtifactLocation] - automount_service_account_token: Optional[bool] - container: Optional[v1.Container] - container_set: Optional[ContainerSetTemplate] - daemon: Optional[bool] - dag: Optional[DAGTemplate] - data: Optional[Data] - executor: Optional[ExecutorConfig] - fail_fast: Optional[bool] - host_aliases: Optional[List[v1.HostAlias]] - http: Optional[HTTP] - init_containers: Optional[List[UserContainer]] - inputs: Optional[Inputs] - memoize: Optional[Memoize] - metadata: Optional[Metadata] - metrics: Optional[Metrics] - name: Optional[str] - node_selector: Optional[Dict[str, str]] - outputs: Optional[Outputs] - parallelism: Optional[int] - plugin: Optional[Plugin] - pod_spec_patch: Optional[str] - priority: Optional[int] - priority_class_name: Optional[str] - resource: Optional[ResourceTemplate] - retry_strategy: Optional[RetryStrategy] - scheduler_name: Optional[str] - script: Optional[ScriptTemplate] - security_context: Optional[v1.PodSecurityContext] - service_account_name: Optional[str] - sidecars: Optional[List[UserContainer]] - steps: Optional[List[ParallelSteps]] - suspend: Optional[SuspendTemplate] - synchronization: Optional[Synchronization] - timeout: Optional[str] - tolerations: Optional[List[v1.Toleration]] - volumes: Optional[List[v1.Volume]] - -class UpdateCronWorkflowRequest(BaseModel): - cron_workflow: Optional[CronWorkflow] - name: Optional[str] - namespace: Optional[str] - -class Workflow(BaseModel): - api_version: Optional[str] - kind: Optional[str] - metadata: v1_1.ObjectMeta - spec: WorkflowSpec - status: Optional[WorkflowStatus] - -class WorkflowCreateRequest(BaseModel): - create_options: Optional[v1_1.CreateOptions] - instance_id: Optional[str] - namespace: Optional[str] - server_dry_run: Optional[bool] - workflow: Optional[Workflow] - -class WorkflowLintRequest(BaseModel): - namespace: Optional[str] - workflow: Optional[Workflow] - -class WorkflowList(BaseModel): - api_version: Optional[str] - items: Optional[List[Workflow]] - kind: Optional[str] - metadata: v1_1.ListMeta - -class WorkflowSpec(BaseModel): - active_deadline_seconds: Optional[int] - affinity: Optional[v1.Affinity] - archive_logs: Optional[bool] - arguments: Optional[Arguments] - artifact_gc: Optional[ArtifactGC] - artifact_repository_ref: Optional[ArtifactRepositoryRef] - automount_service_account_token: Optional[bool] - dns_config: Optional[v1.PodDNSConfig] - dns_policy: Optional[str] - entrypoint: Optional[str] - executor: Optional[ExecutorConfig] - hooks: Optional[Dict[str, LifecycleHook]] - host_aliases: Optional[List[v1.HostAlias]] - host_network: Optional[bool] - image_pull_secrets: Optional[List[v1.LocalObjectReference]] - metrics: Optional[Metrics] - node_selector: Optional[Dict[str, str]] - on_exit: Optional[str] - parallelism: Optional[int] - pod_disruption_budget: Optional[v1beta1.PodDisruptionBudgetSpec] - pod_gc: Optional[PodGC] - pod_metadata: Optional[Metadata] - pod_priority: Optional[int] - pod_priority_class_name: Optional[str] - pod_spec_patch: Optional[str] - priority: Optional[int] - retry_strategy: Optional[RetryStrategy] - scheduler_name: Optional[str] - security_context: Optional[v1.PodSecurityContext] - service_account_name: Optional[str] - shutdown: Optional[str] - suspend: Optional[bool] - synchronization: Optional[Synchronization] - template_defaults: Optional[Template] - templates: Optional[List[Template]] - tolerations: Optional[List[v1.Toleration]] - ttl_strategy: Optional[TTLStrategy] - volume_claim_gc: Optional[VolumeClaimGC] - volume_claim_templates: Optional[List[v1.PersistentVolumeClaim]] - volumes: Optional[List[v1.Volume]] - workflow_metadata: Optional[WorkflowMetadata] - workflow_template_ref: Optional[WorkflowTemplateRef] - -class WorkflowStatus(BaseModel): - artifact_gc_status: Optional[ArtGCStatus] - artifact_repository_ref: Optional[ArtifactRepositoryRefStatus] - compressed_nodes: Optional[str] - conditions: Optional[List[Condition]] - estimated_duration: Optional[int] - finished_at: Optional[v1_1.Time] - message: Optional[str] - nodes: Optional[Dict[str, NodeStatus]] - offload_node_status_version: Optional[str] - outputs: Optional[Outputs] - persistent_volume_claims: Optional[List[v1.Volume]] - phase: Optional[str] - progress: Optional[str] - resources_duration: Optional[Dict[str, int]] - started_at: Optional[v1_1.Time] - stored_templates: Optional[Dict[str, Template]] - stored_workflow_template_spec: Optional[WorkflowSpec] - synchronization: Optional[SynchronizationStatus] - -class WorkflowStep(BaseModel): - arguments: Optional[Arguments] - continue_on: Optional[ContinueOn] - hooks: Optional[Dict[str, LifecycleHook]] - inline: Optional[Template] - name: Optional[str] - on_exit: Optional[str] - template: Optional[str] - template_ref: Optional[TemplateRef] - when: Optional[str] - with_items: Optional[List[Item]] - with_param: Optional[str] - with_sequence: Optional[Sequence] - -class WorkflowTaskSetSpec(BaseModel): - tasks: Optional[Dict[str, Template]] - -class WorkflowTemplate(BaseModel): - api_version: Optional[str] - kind: Optional[str] - metadata: v1_1.ObjectMeta - spec: WorkflowSpec - -class WorkflowTemplateCreateRequest(BaseModel): - create_options: Optional[v1_1.CreateOptions] - namespace: Optional[str] - template: Optional[WorkflowTemplate] - -class WorkflowTemplateLintRequest(BaseModel): - create_options: Optional[v1_1.CreateOptions] - namespace: Optional[str] - template: Optional[WorkflowTemplate] - -class WorkflowTemplateList(BaseModel): - api_version: Optional[str] - items: Optional[List[WorkflowTemplate]] - kind: Optional[str] - metadata: v1_1.ListMeta - -class WorkflowTemplateUpdateRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - template: Optional[WorkflowTemplate] - -class WorkflowWatchEvent(BaseModel): - object: Optional[Workflow] - type: Optional[str] diff --git a/src/hera/events/models/io/k8s/api/core/__init__.py b/src/hera/events/models/io/k8s/api/core/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/io/k8s/api/core/__init__.py +++ b/src/hera/events/models/io/k8s/api/core/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/io/k8s/api/core/v1.py b/src/hera/events/models/io/k8s/api/core/v1.py index be7b2121b..62d4e8ce7 100644 --- a/src/hera/events/models/io/k8s/api/core/v1.py +++ b/src/hera/events/models/io/k8s/api/core/v1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -22,7 +22,9 @@ class SecretKeySelector(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -39,7 +41,9 @@ class ConfigMapKeySelector(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -56,10 +60,10 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is the filesystem type of the volume that you want to mount." + " Tip: Ensure that the filesystem type is supported by the host" + ' operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' + ' inferred to be "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), ), @@ -68,10 +72,10 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Optional[int], Field( description=( - "The partition in the volume that you want to mount. If omitted, the" - " default is to mount by volume name. Examples: For volume /dev/sda1," - ' you specify the partition as "1". Similarly, the volume partition for' - ' /dev/sda is "0" (or you can leave the property empty).' + "partition is the partition in the volume that you want to mount. If" + " omitted, the default is to mount by volume name. Examples: For volume" + ' /dev/sda1, you specify the partition as "1". Similarly, the volume' + ' partition for /dev/sda is "0" (or you can leave the property empty).' ) ), ] = None @@ -80,8 +84,8 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Field( alias="readOnly", description=( - 'Specify "true" to force and set the ReadOnly property in VolumeMounts' - ' to "true". If omitted, the default is "false". More info:' + "readOnly value true will force the readOnly setting in VolumeMounts." + " More info:" " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), ), @@ -91,41 +95,70 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Field( alias="volumeID", description=( - "Unique ID of the persistent disk resource in AWS (Amazon EBS volume)." - " More info:" + "volumeID is unique ID of the persistent disk resource in AWS (Amazon" + " EBS volume). More info:" " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), ), ] +class AppArmorProfile(BaseModel): + localhost_profile: Annotated[ + Optional[str], + Field( + alias="localhostProfile", + description=( + "localhostProfile indicates a profile loaded on the node that should be" + " used. The profile must be preconfigured on the node to work. Must" + " match the loaded name of the profile. Must be set if and only if type" + ' is "Localhost".' + ), + ), + ] = None + type: Annotated[ + str, + Field( + description=( + "type indicates which kind of AppArmor profile will be applied. Valid" + " options are:\n Localhost - a profile pre-loaded on the node.\n " + " RuntimeDefault - the container runtime's default profile.\n " + " Unconfined - no AppArmor enforcement." + ) + ), + ] + + class AzureDiskVolumeSource(BaseModel): caching_mode: Annotated[ Optional[str], Field( alias="cachingMode", - description="Host Caching mode: None, Read Only, Read Write.", + description=("cachingMode is the Host Caching mode: None, Read Only, Read Write."), ), ] = None disk_name: Annotated[ str, Field( alias="diskName", - description="The Name of the data disk in the blob storage", + description="diskName is the Name of the data disk in the blob storage", ), ] disk_uri: Annotated[ str, - Field(alias="diskURI", description="The URI the data disk in the blob storage"), + Field( + alias="diskURI", + description="diskURI is the URI of data disk in the blob storage", + ), ] fs_type: Annotated[ Optional[str], Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is Filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -133,10 +166,10 @@ class AzureDiskVolumeSource(BaseModel): Optional[str], Field( description=( - "Expected values Shared: multiple blob disks per storage account " - " Dedicated: single blob disk per storage account Managed: azure" - " managed data disk (only in managed availability set). defaults to" - " shared" + "kind expected values are Shared: multiple blob disks per storage" + " account Dedicated: single blob disk per storage account Managed:" + " azure managed data disk (only in managed availability set). defaults" + " to shared" ) ), ] = None @@ -145,7 +178,8 @@ class AzureDiskVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly Defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -157,7 +191,8 @@ class AzureFileVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -165,10 +200,10 @@ class AzureFileVolumeSource(BaseModel): str, Field( alias="secretName", - description=("the name of secret that contains Azure Storage Account Name and Key"), + description=("secretName is the name of secret that contains Azure Storage Account" " Name and Key"), ), ] - share_name: Annotated[str, Field(alias="shareName", description="Share Name")] + share_name: Annotated[str, Field(alias="shareName", description="shareName is the azure share Name")] class LocalObjectReference(BaseModel): @@ -176,7 +211,9 @@ class LocalObjectReference(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -193,7 +230,9 @@ class ConfigMapEnvSource(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -204,12 +243,6 @@ class ConfigMapEnvSource(BaseModel): ] = None -class Protocol(Enum): - sctp = "SCTP" - tcp = "TCP" - udp = "UDP" - - class ContainerPort(BaseModel): container_port: Annotated[ int, @@ -246,15 +279,31 @@ class ContainerPort(BaseModel): ), ] = None protocol: Annotated[ - Optional[Protocol], + Optional[str], + Field(description=('Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".')), + ] = None + + +class ContainerResizePolicy(BaseModel): + resource_name: Annotated[ + str, Field( + alias="resourceName", description=( - "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to" - ' "TCP".\n\nPossible enum values:\n - `"SCTP"` is the SCTP protocol.\n' - ' - `"TCP"` is the TCP protocol.\n - `"UDP"` is the UDP protocol.' - ) + "Name of the resource to which this resource resize policy applies." " Supported values: cpu, memory." + ), ), - ] = None + ] + restart_policy: Annotated[ + str, + Field( + alias="restartPolicy", + description=( + "Restart policy to apply when specified resource is resized. If not" + " specified, it defaults to NotRequired." + ), + ), + ] class ObjectFieldSelector(BaseModel): @@ -279,7 +328,9 @@ class SecretEnvSource(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -385,33 +436,36 @@ class FCVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None - lun: Annotated[Optional[int], Field(description="Optional: FC target lun number")] = None + lun: Annotated[Optional[int], Field(description="lun is Optional: FC target lun number")] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" - " ReadOnly setting in VolumeMounts." + "readOnly is Optional: Defaults to false (read/write). ReadOnly here" + " will force the ReadOnly setting in VolumeMounts." ), ), ] = None target_ww_ns: Annotated[ Optional[List[str]], - Field(alias="targetWWNs", description="Optional: FC target worldwide names (WWNs)"), + Field( + alias="targetWWNs", + description="targetWWNs is Optional: FC target worldwide names (WWNs)", + ), ] = None wwids: Annotated[ Optional[List[str]], Field( description=( - "Optional: FC volume world wide identifiers (wwids) Either wwids or" - " combination of targetWWNs and lun must be set, but not both" + "wwids Optional: FC volume world wide identifiers (wwids) Either wwids" + " or combination of targetWWNs and lun must be set, but not both" " simultaneously." ) ), @@ -424,8 +478,8 @@ class FlockerVolumeSource(BaseModel): Field( alias="datasetName", description=( - "Name of the dataset stored as metadata -> name on the dataset for" - " Flocker should be considered as deprecated" + "datasetName is Name of the dataset stored as metadata -> name on the" + " dataset for Flocker should be considered as deprecated" ), ), ] = None @@ -433,7 +487,7 @@ class FlockerVolumeSource(BaseModel): Optional[str], Field( alias="datasetUUID", - description=("UUID of the dataset. This is unique identifier of a Flocker dataset"), + description=("datasetUUID is the UUID of the dataset. This is unique identifier of a" " Flocker dataset"), ), ] = None @@ -444,10 +498,10 @@ class GCEPersistentDiskVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is filesystem type of the volume that you want to mount. Tip:" + " Ensure that the filesystem type is supported by the host operating" + ' system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be' + ' "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), ), @@ -456,10 +510,11 @@ class GCEPersistentDiskVolumeSource(BaseModel): Optional[int], Field( description=( - "The partition in the volume that you want to mount. If omitted, the" - " default is to mount by volume name. Examples: For volume /dev/sda1," - ' you specify the partition as "1". Similarly, the volume partition for' - ' /dev/sda is "0" (or you can leave the property empty). More info:' + "partition is the partition in the volume that you want to mount. If" + " omitted, the default is to mount by volume name. Examples: For volume" + ' /dev/sda1, you specify the partition as "1". Similarly, the volume' + ' partition for /dev/sda is "0" (or you can leave the property empty).' + " More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ) ), @@ -469,8 +524,8 @@ class GCEPersistentDiskVolumeSource(BaseModel): Field( alias="pdName", description=( - "Unique name of the PD resource in GCE. Used to identify the disk in" - " GCE. More info:" + "pdName is unique name of the PD resource in GCE. Used to identify the" + " disk in GCE. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), ), @@ -480,7 +535,7 @@ class GCEPersistentDiskVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the ReadOnly setting in VolumeMounts." + "readOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), @@ -511,15 +566,18 @@ class GitRepoVolumeSource(BaseModel): Optional[str], Field( description=( - "Target directory name. Must not contain or start with '..'. If '.' is" - " supplied, the volume directory will be the git repository. " - " Otherwise, if specified, the volume will contain the git repository" - " in the subdirectory with the given name." + "directory is the target directory name. Must not contain or start with" + " '..'. If '.' is supplied, the volume directory will be the git" + " repository. Otherwise, if specified, the volume will contain the git" + " repository in the subdirectory with the given name." ) ), ] = None - repository: Annotated[str, Field(description="Repository URL")] - revision: Annotated[Optional[str], Field(description="Commit hash for the specified revision.")] = None + repository: Annotated[str, Field(description="repository is the URL")] + revision: Annotated[ + Optional[str], + Field(description="revision is the commit hash for the specified revision."), + ] = None class GlusterfsVolumeSource(BaseModel): @@ -527,8 +585,8 @@ class GlusterfsVolumeSource(BaseModel): str, Field( description=( - "EndpointsName is the endpoint name that details Glusterfs topology." - " More info:" + "endpoints is the endpoint name that details Glusterfs topology. More" + " info:" " https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" ) ), @@ -537,7 +595,7 @@ class GlusterfsVolumeSource(BaseModel): str, Field( description=( - "Path is the Glusterfs volume path. More info:" + "path is the Glusterfs volume path. More info:" " https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" ) ), @@ -547,7 +605,7 @@ class GlusterfsVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the Glusterfs volume to be mounted with" + "readOnly here will force the Glusterfs volume to be mounted with" " read-only permissions. Defaults to false. More info:" " https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" ), @@ -555,19 +613,22 @@ class GlusterfsVolumeSource(BaseModel): ] = None -class Scheme(Enum): - http = "HTTP" - https = "HTTPS" - - class HTTPHeader(BaseModel): - name: Annotated[str, Field(description="The header field name")] + name: Annotated[ + str, + Field( + description=( + "The header field name. This will be canonicalized upon output, so" + " case-variant names will be understood as the same header." + ) + ), + ] value: Annotated[str, Field(description="The header field value")] class HostAlias(BaseModel): hostnames: Annotated[Optional[List[str]], Field(description="Hostnames for the above IP address.")] = None - ip: Annotated[Optional[str], Field(description="IP address of the host file entry.")] = None + ip: Annotated[str, Field(description="IP address of the host file entry.")] class HostPathVolumeSource(BaseModel): @@ -575,7 +636,7 @@ class HostPathVolumeSource(BaseModel): str, Field( description=( - "Path of the directory on the host. If the path is a symlink, it will" + "path of the directory on the host. If the path is a symlink, it will" " follow the link to the real path. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#hostpath" ) @@ -585,7 +646,7 @@ class HostPathVolumeSource(BaseModel): Optional[str], Field( description=( - 'Type for HostPath Volume Defaults to "" More info:' + 'type for HostPath Volume Defaults to "" More info:' " https://kubernetes.io/docs/concepts/storage/volumes#hostpath" ) ), @@ -593,14 +654,14 @@ class HostPathVolumeSource(BaseModel): class KeyToPath(BaseModel): - key: Annotated[str, Field(description="The key to project.")] + key: Annotated[str, Field(description="key is the key to project.")] mode: Annotated[ Optional[int], Field( description=( - "Optional: mode bits used to set permissions on this file. Must be an" - " octal value between 0000 and 0777 or a decimal value between 0 and" - " 511. YAML accepts both octal and decimal values, JSON requires" + "mode is Optional: mode bits used to set permissions on this file. Must" + " be an octal value between 0000 and 0777 or a decimal value between 0" + " and 511. YAML accepts both octal and decimal values, JSON requires" " decimal values for mode bits. If not specified, the volume" " defaultMode will be used. This might be in conflict with other" " options that affect the file mode, like fsGroup, and the result can" @@ -612,7 +673,7 @@ class KeyToPath(BaseModel): str, Field( description=( - "The relative path of the file to map the key to. May not be an" + "path is the relative path of the file to map the key to. May not be an" " absolute path. May not contain the path element '..'. May not start" " with the string '..'." ) @@ -620,12 +681,46 @@ class KeyToPath(BaseModel): ] +class SleepAction(BaseModel): + seconds: Annotated[int, Field(description="Seconds is the number of seconds to sleep.")] + + +class ModifyVolumeStatus(BaseModel): + status: Annotated[ + str, + Field( + description=( + "status is the status of the ControllerModifyVolume operation. It can" + " be in any of following states:\n - Pending\n Pending indicates that" + " the PersistentVolumeClaim cannot be modified due to unmet" + " requirements, such as\n the specified VolumeAttributesClass not" + " existing.\n - InProgress\n InProgress indicates that the volume is" + " being modified.\n - Infeasible\n Infeasible indicates that the" + " request has been rejected as invalid by the CSI driver. To\n\t " + " resolve the error, a valid VolumeAttributesClass needs to be" + " specified.\nNote: New statuses can be added in the future. Consumers" + " should check for unknown statuses and fail appropriately." + ) + ), + ] + target_volume_attributes_class_name: Annotated[ + Optional[str], + Field( + alias="targetVolumeAttributesClassName", + description=( + "targetVolumeAttributesClassName is the name of the" + " VolumeAttributesClass the PVC currently being reconciled" + ), + ), + ] = None + + class NFSVolumeSource(BaseModel): path: Annotated[ str, Field( description=( - "Path that is exported by the NFS server. More info:" + "path that is exported by the NFS server. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#nfs" ) ), @@ -635,7 +730,7 @@ class NFSVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the NFS export to be mounted with read-only" + "readOnly here will force the NFS export to be mounted with read-only" " permissions. Defaults to false. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#nfs" ), @@ -645,32 +740,21 @@ class NFSVolumeSource(BaseModel): str, Field( description=( - "Server is the hostname or IP address of the NFS server. More info:" + "server is the hostname or IP address of the NFS server. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#nfs" ) ), ] -class Operator(Enum): - does_not_exist = "DoesNotExist" - exists = "Exists" - gt = "Gt" - in_ = "In" - lt = "Lt" - not_in = "NotIn" - - class NodeSelectorRequirement(BaseModel): key: Annotated[str, Field(description="The label key that the selector applies to.")] operator: Annotated[ - Operator, + str, Field( description=( "Represents a key's relationship to a set of values. Valid operators" - " are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n\nPossible enum" - ' values:\n - `"DoesNotExist"`\n - `"Exists"`\n - `"Gt"`\n - `"In"`\n -' - ' `"Lt"`\n - `"NotIn"`' + " are In, NotIn, Exists, DoesNotExist. Gt, and Lt." ) ), ] @@ -705,13 +789,23 @@ class NodeSelectorTerm(BaseModel): ] = None -class Phase(Enum): - bound = "Bound" - lost = "Lost" - pending = "Pending" +class TypedLocalObjectReference(BaseModel): + api_group: Annotated[ + Optional[str], + Field( + alias="apiGroup", + 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." + ), + ), + ] = None + kind: Annotated[str, Field(description="Kind is the type of resource being referenced")] + name: Annotated[str, Field(description="Name is the name of resource being referenced")] -class TypedLocalObjectReference(BaseModel): +class TypedObjectReference(BaseModel): api_group: Annotated[ Optional[str], Field( @@ -725,6 +819,44 @@ class TypedLocalObjectReference(BaseModel): ] = None kind: Annotated[str, Field(description="Kind is the type of resource being referenced")] name: Annotated[str, Field(description="Name is the name of resource being referenced")] + namespace: Annotated[ + Optional[str], + Field( + description=( + "Namespace is the namespace of resource being referenced Note that when" + " a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant" + " object is required in the referent namespace to allow that" + " namespace's owner to accept the reference. See the ReferenceGrant" + " documentation for details. (Alpha) This field requires the" + " CrossNamespaceVolumeDataSource feature gate to be enabled." + ) + ), + ] = None + + +class VolumeResourceRequirements(BaseModel): + limits: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field( + description=( + "Limits describes the maximum amount of compute resources allowed. More" + " info:" + " https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + ) + ), + ] = None + requests: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field( + 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. Requests cannot exceed Limits. More info:" + " https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + ) + ), + ] = None class PersistentVolumeClaimVolumeSource(BaseModel): @@ -733,7 +865,7 @@ class PersistentVolumeClaimVolumeSource(BaseModel): Field( alias="claimName", description=( - "ClaimName is the name of a PersistentVolumeClaim in the same namespace" + "claimName is the name of a PersistentVolumeClaim in the same namespace" " as the pod using this volume. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ), @@ -743,7 +875,7 @@ class PersistentVolumeClaimVolumeSource(BaseModel): Optional[bool], Field( alias="readOnly", - description=("Will force the ReadOnly setting in VolumeMounts. Default false."), + description=("readOnly Will force the ReadOnly setting in VolumeMounts. Default" " false."), ), ] = None @@ -754,9 +886,9 @@ class PhotonPersistentDiskVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -764,7 +896,7 @@ class PhotonPersistentDiskVolumeSource(BaseModel): str, Field( alias="pdID", - description="ID that identifies Photon Controller persistent disk", + description=("pdID is the ID that identifies Photon Controller persistent disk"), ), ] @@ -793,12 +925,6 @@ class SELinuxOptions(BaseModel): ] = None -class Type(Enum): - localhost = "Localhost" - runtime_default = "RuntimeDefault" - unconfined = "Unconfined" - - class SeccompProfile(BaseModel): localhost_profile: Annotated[ Optional[str], @@ -808,25 +934,19 @@ class SeccompProfile(BaseModel): "localhostProfile indicates a profile defined in a file on the node" " should be used. The profile must be preconfigured on the node to" " work. Must be a descending path, relative to the kubelet's" - " configured seccomp profile location. Must only be set if type is" - ' "Localhost".' + " configured seccomp profile location. Must be set if type is" + ' "Localhost". Must NOT be set for any other type.' ), ), ] = None type: Annotated[ - Type, + str, Field( description=( "type indicates which kind of seccomp profile will be applied. Valid" " options are:\n\nLocalhost - a profile defined in a file on the node" " should be used. RuntimeDefault - the container runtime default" - " profile should be used. Unconfined - no profile should be" - ' applied.\n\nPossible enum values:\n - `"Localhost"` indicates a' - " profile defined in a file on the node should be used. The file's" - " location relative to /seccomp.\n -" - ' `"RuntimeDefault"` represents the default container runtime seccomp' - ' profile.\n - `"Unconfined"` indicates no seccomp profile is applied' - " (A.K.A. unconfined)." + " profile should be used. Unconfined - no profile should be applied." ) ), ] @@ -858,14 +978,10 @@ class WindowsSecurityContextOptions(BaseModel): alias="hostProcess", description=( "HostProcess determines if a container should be run as a 'Host" - " Process' container. This field is alpha-level and will only be" - " honored by components that enable the WindowsHostProcessContainers" - " feature flag. Setting this field without the feature flag will result" - " in errors when validating the Pod. All of a Pod's containers must" - " have the same effective HostProcess value (it is not allowed to have" - " a mix of HostProcess containers and non-HostProcess containers). In" - " addition, if HostProcess is true then HostNetwork must also be set to" - " true." + " Process' container. All of a Pod's containers must have the same" + " effective HostProcess value (it is not allowed to have a mix of" + " HostProcess containers and non-HostProcess containers). In addition," + " if HostProcess is true then HostNetwork must also be set to true." ), ), ] = None @@ -890,7 +1006,7 @@ class PortworxVolumeSource(BaseModel): Field( alias="fsType", description=( - "FSType represents the filesystem type to mount Must be a filesystem" + "fSType represents the filesystem type to mount Must be a filesystem" ' type supported by the host operating system. Ex. "ext4", "xfs".' ' Implicitly inferred to be "ext4" if unspecified.' ), @@ -901,7 +1017,8 @@ class PortworxVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -909,7 +1026,7 @@ class PortworxVolumeSource(BaseModel): str, Field( alias="volumeID", - description="VolumeID uniquely identifies a Portworx volume", + description="volumeID uniquely identifies a Portworx volume", ), ] @@ -917,14 +1034,14 @@ class PortworxVolumeSource(BaseModel): class QuobyteVolumeSource(BaseModel): group: Annotated[ Optional[str], - Field(description="Group to map volume access to Default is no group"), + Field(description="group to map volume access to Default is no group"), ] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "ReadOnly here will force the Quobyte volume to be mounted with" + "readOnly here will force the Quobyte volume to be mounted with" " read-only permissions. Defaults to false." ), ), @@ -933,7 +1050,7 @@ class QuobyteVolumeSource(BaseModel): str, Field( description=( - "Registry represents a single or multiple Quobyte Registry services" + "registry represents a single or multiple Quobyte Registry services" " specified as a string as host:port pair (multiple entries are" " separated with commas) which acts as the central registry for volumes" ) @@ -943,18 +1060,31 @@ class QuobyteVolumeSource(BaseModel): Optional[str], Field( description=( - "Tenant owning the given Quobyte volume in the Backend Used with" + "tenant owning the given Quobyte volume in the Backend Used with" " dynamically provisioned Quobyte volumes, value is set by the plugin" ) ), ] = None user: Annotated[ Optional[str], - Field(description="User to map volume access to Defaults to serivceaccount user"), + Field(description="user to map volume access to Defaults to serivceaccount user"), ] = None volume: Annotated[ str, - Field(description=("Volume is a string that references an already created Quobyte volume" " by name.")), + Field(description=("volume is a string that references an already created Quobyte volume" " by name.")), + ] + + +class ResourceClaim(BaseModel): + name: Annotated[ + str, + Field( + description=( + "Name must match the name of one entry in pod.spec.resourceClaims of" + " the Pod where this field is used. It makes that resource available" + " inside a container." + ) + ), ] @@ -963,7 +1093,7 @@ class SecretProjection(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items if unspecified, each key-value pair in the Data field of the" " referenced Secret will be projected into the volume as a file whose" " name is the key and content is the value. If specified, the listed" " keys will be projected into the specified paths, and unlisted keys" @@ -978,14 +1108,16 @@ class SecretProjection(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the Secret or its key must be defined"), + Field(description=("optional field specify whether the Secret or its key must be defined")), ] = None @@ -995,10 +1127,10 @@ class SecretVolumeSource(BaseModel): Field( alias="defaultMode", description=( - "Optional: mode bits used to set permissions on created files by" - " default. Must be an octal value between 0000 and 0777 or a decimal" - " value between 0 and 511. YAML accepts both octal and decimal values," - " JSON requires decimal values for mode bits. Defaults to 0644." + "defaultMode is Optional: mode bits used to set permissions on created" + " files by default. Must be an octal value between 0000 and 0777 or a" + " decimal value between 0 and 511. YAML accepts both octal and decimal" + " values, JSON requires decimal values for mode bits. Defaults to 0644." " Directories within the path are not affected by this setting. This" " might be in conflict with other options that affect the file mode," " like fsGroup, and the result can be other mode bits set." @@ -1009,7 +1141,7 @@ class SecretVolumeSource(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items If unspecified, each key-value pair in the Data field of the" " referenced Secret will be projected into the volume as a file whose" " name is the key and content is the value. If specified, the listed" " keys will be projected into the specified paths, and unlisted keys" @@ -1022,15 +1154,15 @@ class SecretVolumeSource(BaseModel): ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the Secret or its keys must be defined"), + Field(description=("optional field specify whether the Secret or its keys must be defined")), ] = None secret_name: Annotated[ Optional[str], Field( alias="secretName", description=( - "Name of the secret in the pod's namespace to use. More info:" - " https://kubernetes.io/docs/concepts/storage/volumes#secret" + "secretName is the name of the secret in the pod's namespace to use." + " More info: https://kubernetes.io/docs/concepts/storage/volumes#secret" ), ), ] = None @@ -1041,7 +1173,7 @@ class ServiceAccountTokenProjection(BaseModel): Optional[str], Field( description=( - "Audience is the intended audience of the token. A recipient of a token" + "audience is the intended audience of the token. A recipient of a token" " must identify itself with an identifier specified in the audience of" " the token, and otherwise should reject the token. The audience" " defaults to the identifier of the apiserver." @@ -1053,7 +1185,7 @@ class ServiceAccountTokenProjection(BaseModel): Field( alias="expirationSeconds", description=( - "ExpirationSeconds is the requested duration of validity of the service" + "expirationSeconds is the requested duration of validity of the service" " account token. As the token approaches expiration, the kubelet volume" " plugin will proactively rotate the service account token. The kubelet" " will start trying to rotate the token if the token is older than 80" @@ -1064,7 +1196,7 @@ class ServiceAccountTokenProjection(BaseModel): ] = None path: Annotated[ str, - Field(description=("Path is the path relative to the mount point of the file to project" " the token into.")), + Field(description=("path is the path relative to the mount point of the file to project" " the token into.")), ] @@ -1073,34 +1205,14 @@ class Sysctl(BaseModel): value: Annotated[str, Field(description="Value of a property to set")] -class Effect(Enum): - no_execute = "NoExecute" - no_schedule = "NoSchedule" - prefer_no_schedule = "PreferNoSchedule" - - -class OperatorModel(Enum): - equal = "Equal" - exists = "Exists" - - class Toleration(BaseModel): effect: Annotated[ - Optional[Effect], + Optional[str], Field( description=( "Effect indicates the taint effect to match. Empty means match all" " taint effects. When specified, allowed values are NoSchedule," - " PreferNoSchedule and NoExecute.\n\nPossible enum values:\n -" - ' `"NoExecute"` Evict any already-running pods that do not tolerate the' - ' taint. Currently enforced by NodeController.\n - `"NoSchedule"` Do' - " not allow new pods to schedule onto the node unless they tolerate the" - " taint, but allow all pods submitted to Kubelet without going through" - " the scheduler to start, and allow all already-running pods to" - ' continue running. Enforced by the scheduler.\n - `"PreferNoSchedule"`' - " Like TaintEffectNoSchedule, but the scheduler tries not to schedule" - " new pods onto the node, rather than prohibiting new pods from" - " scheduling onto the node entirely. Enforced by the scheduler." + " PreferNoSchedule and NoExecute." ) ), ] = None @@ -1115,14 +1227,13 @@ class Toleration(BaseModel): ), ] = None operator: Annotated[ - Optional[OperatorModel], + Optional[str], Field( description=( - "Operator represents a key's relationship to the value. Valid" - " operators are Exists and Equal. Defaults to Equal. Exists is" - " equivalent to wildcard for value, so that a pod can tolerate all" - " taints of a particular category.\n\nPossible enum values:\n -" - ' `"Equal"`\n - `"Exists"`' + "Operator represents a key's relationship to the value. Valid operators" + " are Exists and Equal. Defaults to Equal. Exists is equivalent to" + " wildcard for value, so that a pod can tolerate all taints of a" + " particular category." ) ), ] = None @@ -1156,9 +1267,9 @@ class VsphereVirtualDiskVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -1167,7 +1278,8 @@ class VsphereVirtualDiskVolumeSource(BaseModel): Field( alias="storagePolicyID", description=( - "Storage Policy Based Management (SPBM) profile ID associated with the" " StoragePolicyName." + "storagePolicyID is the storage Policy Based Management (SPBM) profile" + " ID associated with the StoragePolicyName." ), ), ] = None @@ -1175,12 +1287,15 @@ class VsphereVirtualDiskVolumeSource(BaseModel): Optional[str], Field( alias="storagePolicyName", - description="Storage Policy Based Management (SPBM) profile name.", + description=("storagePolicyName is the storage Policy Based Management (SPBM)" " profile name."), ), ] = None volume_path: Annotated[ str, - Field(alias="volumePath", description="Path that identifies vSphere volume vmdk"), + Field( + alias="volumePath", + description="volumePath is the path that identifies vSphere volume vmdk", + ), ] @@ -1213,7 +1328,10 @@ class VolumeMount(BaseModel): description=( "mountPropagation determines how mounts are propagated from the host to" " container and the other way around. When not set," - " MountPropagationNone is used. This field is beta in 1.10." + " MountPropagationNone is used. This field is beta in 1.10. When" + " RecursiveReadOnly is set to IfPossible or to Enabled," + " MountPropagation must be None or unspecified (which defaults to" + " None)." ), ), ] = None @@ -1227,6 +1345,26 @@ class VolumeMount(BaseModel): ), ), ] = None + recursive_read_only: Annotated[ + Optional[str], + Field( + alias="recursiveReadOnly", + description=( + "RecursiveReadOnly specifies whether read-only mounts should be handled" + " recursively.\n\nIf ReadOnly is false, this field has no meaning and" + " must be unspecified.\n\nIf ReadOnly is true, and this field is set to" + " Disabled, the mount is not made recursively read-only. If this field" + " is set to IfPossible, the mount is made recursively read-only, if it" + " is supported by the container runtime. If this field is set to" + " Enabled, the mount is made recursively read-only if it is supported" + " by the container runtime, otherwise the pod will not be started and" + " an error will be generated to indicate the reason.\n\nIf this field" + " is set to IfPossible or Enabled, MountPropagation must be set to None" + " (or be unspecified, which defaults to None).\n\nIf this field is not" + " specified, it is treated as an equivalent of Disabled." + ), + ), + ] = None sub_path: Annotated[ Optional[str], Field( @@ -1258,49 +1396,38 @@ class ImagePullPolicy(Enum): if_not_present = "IfNotPresent" -class TypeModel(Enum): - file_system_resize_pending = "FileSystemResizePending" - resizing = "Resizing" - - class PersistentVolumeClaimCondition(BaseModel): last_probe_time: Annotated[ Optional[v1.Time], - Field(alias="lastProbeTime", description="Last time we probed the condition."), + Field( + alias="lastProbeTime", + description="lastProbeTime is the time we probed the condition.", + ), ] = None last_transition_time: Annotated[ Optional[v1.Time], Field( alias="lastTransitionTime", - description=("Last time the condition transitioned from one status to another."), + description=("lastTransitionTime is the time the condition transitioned from one" " status to another."), ), ] = None message: Annotated[ Optional[str], - Field(description=("Human-readable message indicating details about last transition.")), + Field(description=("message is the human-readable message indicating details about last" " transition.")), ] = None reason: Annotated[ Optional[str], Field( description=( - "Unique, this should be a short, machine understandable string that" - " gives the reason for condition's last transition. If it reports" - ' "ResizeStarted" that means the underlying persistent volume is being' - " resized." + "reason is a unique, this should be a short, machine understandable" + " string that gives the reason for condition's last transition. If it" + ' reports "Resizing" that means the underlying persistent volume is' + " being resized." ) ), ] = None status: str - type: Annotated[ - TypeModel, - Field( - description=( - '\n\n\nPossible enum values:\n - `"FileSystemResizePending"` -' - " controller resize is finished and a file system resize is pending on" - ' node\n - `"Resizing"` - a user trigger resize of pvc has been started' - ) - ), - ] + type: str class ServicePort(BaseModel): @@ -1309,11 +1436,20 @@ class ServicePort(BaseModel): Field( alias="appProtocol", 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" + "The application protocol for this port. This is used as a hint for" + " implementations to offer richer behavior for protocols that they" + " understand. This field follows standard Kubernetes label syntax." + " Valid values are either:\n\n* Un-prefixed protocol names - reserved" + " for IANA standard service names (as per RFC-6335 and" + " https://www.iana.org/assignments/service-names).\n\n*" + " Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2" + " prior knowledge over cleartext as described in" + " https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-\n" + " * 'kubernetes.io/ws' - WebSocket over cleartext as described in" + " https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' -" + " WebSocket over TLS as described in" + " https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should" + " use implementation-defined prefixed names such as" " mycompany.com/my-custom-protocol." ), ), @@ -1349,15 +1485,8 @@ class ServicePort(BaseModel): ] = None port: Annotated[int, Field(description="The port that will be exposed by this service.")] protocol: Annotated[ - Optional[Protocol], - Field( - description=( - 'The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".' - ' Default is TCP.\n\nPossible enum values:\n - `"SCTP"` is the SCTP' - ' protocol.\n - `"TCP"` is the TCP protocol.\n - `"UDP"` is the UDP' - " protocol." - ) - ), + Optional[str], + Field(description=('The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".' " Default is TCP.")), ] = None target_port: Annotated[ Optional[intstr.IntOrString], @@ -1398,7 +1527,7 @@ class CSIVolumeSource(BaseModel): str, Field( description=( - "Driver is the name of the CSI driver that handles this volume. Consult" + "driver is the name of the CSI driver that handles this volume. Consult" " with your admin for the correct name as registered in the cluster." ) ), @@ -1408,9 +1537,9 @@ class CSIVolumeSource(BaseModel): Field( alias="fsType", description=( - 'Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided,' - " the empty value is passed to the associated CSI driver which will" - " determine the default filesystem to apply." + 'fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty' + " value is passed to the associated CSI driver which will determine the" + " default filesystem to apply." ), ), ] = None @@ -1419,7 +1548,7 @@ class CSIVolumeSource(BaseModel): Field( alias="nodePublishSecretRef", description=( - "NodePublishSecretRef is a reference to the secret object containing" + "nodePublishSecretRef is a reference to the secret object containing" " sensitive information to pass to the CSI driver to complete the CSI" " NodePublishVolume and NodeUnpublishVolume calls. This field is" " optional, and may be empty if no secret is required. If the secret" @@ -1432,7 +1561,9 @@ class CSIVolumeSource(BaseModel): Optional[bool], Field( alias="readOnly", - description=("Specifies a read-only configuration for the volume. Defaults to false" " (read/write)."), + description=( + "readOnly specifies a read-only configuration for the volume. Defaults" " to false (read/write)." + ), ), ] = None volume_attributes: Annotated[ @@ -1440,7 +1571,7 @@ class CSIVolumeSource(BaseModel): Field( alias="volumeAttributes", description=( - "VolumeAttributes stores driver-specific properties that are passed to" + "volumeAttributes stores driver-specific properties that are passed to" " the CSI driver. Consult your driver's documentation for supported" " values." ), @@ -1453,22 +1584,24 @@ class CephFSVolumeSource(BaseModel): List[str], Field( description=( - "Required: Monitors is a collection of Ceph monitors More info:" - " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" + "monitors is Required: Monitors is a collection of Ceph monitors More" + " info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ) ), ] path: Annotated[ Optional[str], - Field(description=("Optional: Used as the mounted root, rather than the full Ceph tree," " default is /")), + Field( + description=("path is Optional: Used as the mounted root, rather than the full Ceph" " tree, default is /") + ), ] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" - " ReadOnly setting in VolumeMounts. More info:" + "readOnly is Optional: Defaults to false (read/write). ReadOnly here" + " will force the ReadOnly setting in VolumeMounts. More info:" " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ), ), @@ -1478,8 +1611,8 @@ class CephFSVolumeSource(BaseModel): Field( alias="secretFile", description=( - "Optional: SecretFile is the path to key ring for User, default is" - " /etc/ceph/user.secret More info:" + "secretFile is Optional: SecretFile is the path to key ring for User," + " default is /etc/ceph/user.secret More info:" " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ), ), @@ -1489,8 +1622,8 @@ class CephFSVolumeSource(BaseModel): Field( alias="secretRef", description=( - "Optional: SecretRef is reference to the authentication secret for" - " User, default is empty. More info:" + "secretRef is Optional: SecretRef is reference to the authentication" + " secret for User, default is empty. More info:" " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ), ), @@ -1499,8 +1632,8 @@ class CephFSVolumeSource(BaseModel): Optional[str], Field( description=( - "Optional: User is the rados user name, default is admin More info:" - " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" + "user is optional: User is the rados user name, default is admin More" + " info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ) ), ] = None @@ -1512,9 +1645,9 @@ class CinderVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' - ' inferred to be "ext4" if unspecified. More info:' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Examples: "ext4", "xfs",' + ' "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:' " https://examples.k8s.io/mysql-cinder-pd/README.md" ), ), @@ -1524,7 +1657,7 @@ class CinderVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" + "readOnly defaults to false (read/write). ReadOnly here will force the" " ReadOnly setting in VolumeMounts. More info:" " https://examples.k8s.io/mysql-cinder-pd/README.md" ), @@ -1534,7 +1667,10 @@ class CinderVolumeSource(BaseModel): Optional[LocalObjectReference], Field( alias="secretRef", - description=("Optional: points to a secret object containing parameters used to" " connect to OpenStack."), + description=( + "secretRef is optional: points to a secret object containing parameters" + " used to connect to OpenStack." + ), ), ] = None volume_id: Annotated[ @@ -1542,7 +1678,7 @@ class CinderVolumeSource(BaseModel): Field( alias="volumeID", description=( - "volume id used to identify the volume in cinder. More info:" + "volumeID used to identify the volume in cinder. More info:" " https://examples.k8s.io/mysql-cinder-pd/README.md" ), ), @@ -1552,30 +1688,30 @@ class CinderVolumeSource(BaseModel): class FlexVolumeSource(BaseModel): driver: Annotated[ str, - Field(description="Driver is the name of the driver to use for this volume."), + Field(description="driver is the name of the driver to use for this volume."), ] fs_type: Annotated[ Optional[str], Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". The default' - " filesystem depends on FlexVolume script." + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + " The default filesystem depends on FlexVolume script." ), ), ] = None options: Annotated[ Optional[Dict[str, str]], - Field(description="Optional: Extra command options if any."), + Field(description=("options is Optional: this field holds extra command options if any.")), ] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" - " ReadOnly setting in VolumeMounts." + "readOnly is Optional: defaults to false (read/write). ReadOnly here" + " will force the ReadOnly setting in VolumeMounts." ), ), ] = None @@ -1584,10 +1720,11 @@ class FlexVolumeSource(BaseModel): Field( alias="secretRef", description=( - "Optional: SecretRef is reference to the secret object containing" - " sensitive information to pass to the plugin scripts. This may be" - " empty if no secret object is specified. If the secret object contains" - " more than one secret, all secrets are passed to the plugin scripts." + "secretRef is Optional: secretRef is reference to the secret object" + " containing sensitive information to pass to the plugin scripts. This" + " may be empty if no secret object is specified. If the secret object" + " contains more than one secret, all secrets are passed to the plugin" + " scripts." ), ), ] = None @@ -1598,14 +1735,14 @@ class ISCSIVolumeSource(BaseModel): Optional[bool], Field( alias="chapAuthDiscovery", - description="whether support iSCSI Discovery CHAP authentication", + description=("chapAuthDiscovery defines whether support iSCSI Discovery CHAP" " authentication"), ), ] = None chap_auth_session: Annotated[ Optional[bool], Field( alias="chapAuthSession", - description="whether support iSCSI Session CHAP authentication", + description=("chapAuthSession defines whether support iSCSI Session CHAP" " authentication"), ), ] = None fs_type: Annotated[ @@ -1613,10 +1750,10 @@ class ISCSIVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is the filesystem type of the volume that you want to mount." + " Tip: Ensure that the filesystem type is supported by the host" + ' operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' + ' inferred to be "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#iscsi" ), ), @@ -1626,27 +1763,30 @@ class ISCSIVolumeSource(BaseModel): Field( alias="initiatorName", description=( - "Custom iSCSI Initiator Name. If initiatorName is specified with" - " iscsiInterface simultaneously, new iSCSI interface : will be created for the connection." + "initiatorName is the custom iSCSI Initiator Name. If initiatorName is" + " specified with iscsiInterface simultaneously, new iSCSI interface" + " : will be created for the connection." ), ), ] = None - iqn: Annotated[str, Field(description="Target iSCSI Qualified Name.")] + iqn: Annotated[str, Field(description="iqn is the target iSCSI Qualified Name.")] iscsi_interface: Annotated[ Optional[str], Field( alias="iscsiInterface", - description=("iSCSI Interface Name that uses an iSCSI transport. Defaults to" " 'default' (tcp)."), + description=( + "iscsiInterface is the interface Name that uses an iSCSI transport." " Defaults to 'default' (tcp)." + ), ), ] = None - lun: Annotated[int, Field(description="iSCSI Target Lun number.")] + lun: Annotated[int, Field(description="lun represents iSCSI Target Lun number.")] portals: Annotated[ Optional[List[str]], Field( description=( - "iSCSI Target Portal List. The portal is either an IP or ip_addr:port" - " if the port is other than default (typically TCP ports 860 and 3260)." + "portals is the iSCSI Target Portal List. The portal is either an IP or" + " ip_addr:port if the port is other than default (typically TCP ports" + " 860 and 3260)." ) ), ] = None @@ -1654,14 +1794,14 @@ class ISCSIVolumeSource(BaseModel): Optional[bool], Field( alias="readOnly", - description=("ReadOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false."), + description=("readOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false."), ), ] = None secret_ref: Annotated[ Optional[LocalObjectReference], Field( alias="secretRef", - description="CHAP Secret for iSCSI target and initiator authentication", + description=("secretRef is the CHAP Secret for iSCSI target and initiator" " authentication"), ), ] = None target_portal: Annotated[ @@ -1669,8 +1809,9 @@ class ISCSIVolumeSource(BaseModel): Field( alias="targetPortal", description=( - "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the" - " port is other than default (typically TCP ports 860 and 3260)." + "targetPortal is iSCSI Target Portal. The Portal is either an IP or" + " ip_addr:port if the port is other than default (typically TCP ports" + " 860 and 3260)." ), ), ] @@ -1682,10 +1823,10 @@ class RBDVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is the filesystem type of the volume that you want to mount." + " Tip: Ensure that the filesystem type is supported by the host" + ' operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' + ' inferred to be "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#rbd" ), ), @@ -1694,7 +1835,8 @@ class RBDVolumeSource(BaseModel): str, Field( description=( - "The rados image name. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" + "image is the rados image name. More info:" + " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), ] @@ -1702,7 +1844,7 @@ class RBDVolumeSource(BaseModel): Optional[str], Field( description=( - "Keyring is the path to key ring for RBDUser. Default is" + "keyring is the path to key ring for RBDUser. Default is" " /etc/ceph/keyring. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) @@ -1712,7 +1854,7 @@ class RBDVolumeSource(BaseModel): List[str], Field( description=( - "A collection of Ceph monitors. More info:" + "monitors is a collection of Ceph monitors. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), @@ -1721,7 +1863,7 @@ class RBDVolumeSource(BaseModel): Optional[str], Field( description=( - "The rados pool name. Default is rbd. More info:" + "pool is the rados pool name. Default is rbd. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), @@ -1731,7 +1873,7 @@ class RBDVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the ReadOnly setting in VolumeMounts." + "readOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ), @@ -1742,7 +1884,7 @@ class RBDVolumeSource(BaseModel): Field( alias="secretRef", description=( - "SecretRef is name of the authentication secret for RBDUser. If" + "secretRef is name of the authentication secret for RBDUser. If" " provided overrides keyring. Default is nil. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ), @@ -1752,7 +1894,7 @@ class RBDVolumeSource(BaseModel): Optional[str], Field( description=( - "The rados user name. Default is admin. More info:" + "user is the rados user name. Default is admin. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), @@ -1765,17 +1907,23 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Default is "xfs".' ), ), ] = None - gateway: Annotated[str, Field(description="The host address of the ScaleIO API Gateway.")] + gateway: Annotated[ + str, + Field(description="gateway is the host address of the ScaleIO API Gateway."), + ] protection_domain: Annotated[ Optional[str], Field( alias="protectionDomain", - description=("The name of the ScaleIO Protection Domain for the configured storage."), + description=( + "protectionDomain is the name of the ScaleIO Protection Domain for the" " configured storage." + ), ), ] = None read_only: Annotated[ @@ -1783,7 +1931,8 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly Defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -1792,7 +1941,7 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="secretRef", description=( - "SecretRef references to the secret for ScaleIO user and other" + "secretRef references to the secret for ScaleIO user and other" " sensitive information. If this is not provided, Login operation will" " fail." ), @@ -1802,7 +1951,7 @@ class ScaleIOVolumeSource(BaseModel): Optional[bool], Field( alias="sslEnabled", - description=("Flag to enable/disable SSL communication with Gateway, default false"), + description=("sslEnabled Flag enable/disable SSL communication with Gateway, default" " false"), ), ] = None storage_mode: Annotated[ @@ -1810,8 +1959,8 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="storageMode", description=( - "Indicates whether the storage for a volume should be ThickProvisioned" - " or ThinProvisioned. Default is ThinProvisioned." + "storageMode indicates whether the storage for a volume should be" + " ThickProvisioned or ThinProvisioned. Default is ThinProvisioned." ), ), ] = None @@ -1819,20 +1968,20 @@ class ScaleIOVolumeSource(BaseModel): Optional[str], Field( alias="storagePool", - description=("The ScaleIO Storage Pool associated with the protection domain."), + description=("storagePool is the ScaleIO Storage Pool associated with the protection" " domain."), ), ] = None system: Annotated[ str, - Field(description="The name of the storage system as configured in ScaleIO."), + Field(description=("system is the name of the storage system as configured in ScaleIO.")), ] volume_name: Annotated[ Optional[str], Field( alias="volumeName", description=( - "The name of a volume already created in the ScaleIO system that is" - " associated with this volume source." + "volumeName is the name of a volume already created in the ScaleIO" + " system that is associated with this volume source." ), ), ] = None @@ -1844,9 +1993,9 @@ class StorageOSVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -1855,7 +2004,8 @@ class StorageOSVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -1864,7 +2014,7 @@ class StorageOSVolumeSource(BaseModel): Field( alias="secretRef", description=( - "SecretRef specifies the secret to use for obtaining the StorageOS API" + "secretRef specifies the secret to use for obtaining the StorageOS API" " credentials. If not specified, default values will be attempted." ), ), @@ -1874,7 +2024,7 @@ class StorageOSVolumeSource(BaseModel): Field( alias="volumeName", description=( - "VolumeName is the human-readable name of the StorageOS volume. Volume" + "volumeName is the human-readable name of the StorageOS volume. Volume" " names are only unique within a namespace." ), ), @@ -1884,7 +2034,7 @@ class StorageOSVolumeSource(BaseModel): Field( alias="volumeNamespace", description=( - "VolumeNamespace specifies the scope of the volume within StorageOS. " + "volumeNamespace specifies the scope of the volume within StorageOS. " " If no namespace is specified then the Pod's namespace will be used. " " This allows the Kubernetes name scoping to be mirrored within" " StorageOS for tighter integration. Set VolumeName to any name to" @@ -1901,9 +2051,9 @@ class EmptyDirVolumeSource(BaseModel): Optional[str], Field( description=( - "What type of storage medium should back this directory. The default is" - ' "" which means to use the node\'s default medium. Must be an empty' - " string (default) or Memory. More info:" + "medium represents what type of storage medium should back this" + ' directory. The default is "" which means to use the node\'s default' + " medium. Must be an empty string (default) or Memory. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#emptydir" ) ), @@ -1913,13 +2063,13 @@ class EmptyDirVolumeSource(BaseModel): Field( alias="sizeLimit", description=( - "Total amount of local storage required for this EmptyDir volume. The" - " size limit is also applicable for memory medium. The maximum usage on" - " memory medium EmptyDir would be the minimum value between the" - " SizeLimit specified here and the sum of memory limits of all" - " containers in a pod. The default is nil which means that the limit is" - " undefined. More info:" - " http://kubernetes.io/docs/user-guide/volumes#emptydir" + "sizeLimit is the total amount of local storage required for this" + " EmptyDir volume. The size limit is also applicable for memory medium." + " The maximum usage on memory medium EmptyDir would be the minimum" + " value between the SizeLimit specified here and the sum of memory" + " limits of all containers in a pod. The default is nil which means" + " that the limit is undefined. More info:" + " https://kubernetes.io/docs/concepts/storage/volumes#emptydir" ), ), ] = None @@ -1968,6 +2118,136 @@ class EventSeries(BaseModel): ] = None +class PersistentVolumeClaimStatus(BaseModel): + access_modes: Annotated[ + Optional[List[str]], + Field( + alias="accessModes", + description=( + "accessModes contains the actual access modes the volume backing the" + " PVC has. More info:" + " https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1" + ), + ), + ] = None + allocated_resource_statuses: Annotated[ + Optional[Dict[str, str]], + Field( + alias="allocatedResourceStatuses", + description=( + "allocatedResourceStatuses stores status of resource being resized for" + " the given PVC. Key names follow standard Kubernetes label syntax." + " Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the" + " capacity of the volume.\n\t* Custom resources must use" + " implementation-defined prefixed names such as" + ' "example.com/my-custom-resource"\nApart from above values - keys that' + " are unprefixed or have kubernetes.io prefix are considered reserved" + " and hence may not be used.\n\nClaimResourceStatus can be in any of" + " following states:\n\t- ControllerResizeInProgress:\n\t\tState set" + " when resize controller starts resizing the volume in" + " control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when" + " resize has failed in resize controller with a terminal error.\n\t-" + " NodeResizePending:\n\t\tState set when resize controller has finished" + " resizing the volume but further resizing of\n\t\tvolume is needed on" + " the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet" + " starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set" + " when resizing has failed in kubelet with a terminal error. Transient" + " errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a" + " PVC for more capacity - this field can be one of the following" + " states:\n\t- pvc.status.allocatedResourceStatus['storage'] =" + ' "ControllerResizeInProgress"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "ControllerResizeFailed"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "NodeResizePending"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "NodeResizeInProgress"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "NodeResizeFailed"\nWhen this field is not set, it means that no' + " resize operation is in progress for the given PVC.\n\nA controller" + " that receives PVC update with previously unknown resourceName or" + " ClaimResourceStatus should ignore the update for the purpose it was" + " designed. For example - a controller that only is responsible for" + " resizing capacity of the volume, should ignore PVC updates that" + " change other valid resources associated with PVC.\n\nThis is an alpha" + " field and requires enabling RecoverVolumeExpansionFailure feature." + ), + ), + ] = None + allocated_resources: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field( + alias="allocatedResources", + description=( + "allocatedResources tracks the resources allocated to a PVC including" + " its capacity. Key names follow standard Kubernetes label syntax." + " Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the" + " capacity of the volume.\n\t* Custom resources must use" + " implementation-defined prefixed names such as" + ' "example.com/my-custom-resource"\nApart from above values - keys that' + " are unprefixed or have kubernetes.io prefix are considered reserved" + " and hence may not be used.\n\nCapacity reported here may be larger" + " than the actual capacity when a volume expansion operation is" + " requested. For storage quota, the larger value from" + " allocatedResources and PVC.spec.resources is used. If" + " allocatedResources is not set, PVC.spec.resources alone is used for" + " quota calculation. If a volume expansion capacity request is lowered," + " allocatedResources is only lowered if there are no expansion" + " operations in progress and if the actual volume capacity is equal or" + " lower than the requested capacity.\n\nA controller that receives PVC" + " update with previously unknown resourceName should ignore the update" + " for the purpose it was designed. For example - a controller that only" + " is responsible for resizing capacity of the volume, should ignore PVC" + " updates that change other valid resources associated with" + " PVC.\n\nThis is an alpha field and requires enabling" + " RecoverVolumeExpansionFailure feature." + ), + ), + ] = None + capacity: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field(description=("capacity represents the actual resources of the underlying volume.")), + ] = None + conditions: Annotated[ + Optional[List[PersistentVolumeClaimCondition]], + Field( + description=( + "conditions is the current Condition of persistent volume claim. If" + " underlying persistent volume is being resized then the Condition will" + " be set to 'Resizing'." + ) + ), + ] = None + current_volume_attributes_class_name: Annotated[ + Optional[str], + Field( + alias="currentVolumeAttributesClassName", + description=( + "currentVolumeAttributesClassName is the current name of the" + " VolumeAttributesClass the PVC is using. When unset, there is no" + " VolumeAttributeClass applied to this PersistentVolumeClaim This is an" + " alpha field and requires enabling VolumeAttributesClass feature." + ), + ), + ] = None + modify_volume_status: Annotated[ + Optional[ModifyVolumeStatus], + Field( + alias="modifyVolumeStatus", + description=( + "ModifyVolumeStatus represents the status object of" + " ControllerModifyVolume operation. When this is unset, there is no" + " ModifyVolume operation being attempted. This is an alpha field and" + " requires enabling VolumeAttributesClass feature." + ), + ), + ] = None + phase: Annotated[ + Optional[str], + Field(description="phase represents the current phase of PersistentVolumeClaim."), + ] = None + + class PreferredSchedulingTerm(BaseModel): preference: Annotated[ NodeSelectorTerm, @@ -1982,6 +2262,17 @@ class PreferredSchedulingTerm(BaseModel): class PodSecurityContext(BaseModel): + app_armor_profile: Annotated[ + Optional[AppArmorProfile], + Field( + alias="appArmorProfile", + description=( + "appArmorProfile is the AppArmor options to use by the containers in" + " this pod. Note that this field cannot be set when spec.os.name is" + " windows." + ), + ), + ] = None fs_group: Annotated[ Optional[int], Field( @@ -2086,9 +2377,13 @@ class PodSecurityContext(BaseModel): alias="supplementalGroups", description=( "A list of groups applied to the first process run in each container," - " in addition to the container's primary GID. If unspecified, no" - " groups will be added to any container. Note that this field cannot be" - " set when spec.os.name is windows." + " in addition to the container's primary GID, the fsGroup (if" + " specified), and group memberships defined in the container image for" + " the uid of the container process. If unspecified, no additional" + " groups are added to any container. Note that group memberships" + " defined in the container image for the uid of the container process" + " are still effective, even if they are not included in this list. Note" + " that this field cannot be set when spec.os.name is windows." ), ), ] = None @@ -2132,6 +2427,17 @@ class SecurityContext(BaseModel): ), ), ] = None + app_armor_profile: Annotated[ + Optional[AppArmorProfile], + Field( + alias="appArmorProfile", + description=( + "appArmorProfile is the AppArmor options to use by this container. If" + " set, this profile overrides the pod's appArmorProfile. Note that this" + " field cannot be set when spec.os.name is windows." + ), + ), + ] = None capabilities: Annotated[ Optional[Capabilities], Field( @@ -2265,7 +2571,8 @@ class DownwardAPIVolumeFile(BaseModel): Field( alias="fieldRef", description=( - "Required: Selects a field of the pod: only annotations, labels, name" " and namespace are supported." + "Required: Selects a field of the pod: only annotations, labels, name," + " namespace and uid are supported." ), ), ] = None @@ -2373,12 +2680,18 @@ class EnvVar(BaseModel): ] = None -class TerminationMessagePolicy(Enum): - fallback_to_logs_on_error = "FallbackToLogsOnError" - file = "File" - - class ResourceRequirements(BaseModel): + claims: Annotated[ + Optional[List[ResourceClaim]], + Field( + description=( + "Claims lists the names of resources, defined in spec.resourceClaims," + " that are used by this container.\n\nThis is an alpha field and" + " requires enabling the DynamicResourceAllocation feature gate.\n\nThis" + " field is immutable. It can only be set for containers." + ) + ), + ] = None limits: Annotated[ Optional[Dict[str, resource.Quantity]], Field( @@ -2396,7 +2709,7 @@ class ResourceRequirements(BaseModel): "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:" + " value. Requests cannot exceed Limits. More info:" " https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" ) ), @@ -2442,7 +2755,7 @@ class ConfigMapProjection(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items if unspecified, each key-value pair in the Data field of the" " referenced ConfigMap will be projected into the volume as a file" " whose name is the key and content is the value. If specified, the" " listed keys will be projected into the specified paths, and unlisted" @@ -2457,14 +2770,16 @@ class ConfigMapProjection(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the ConfigMap or its keys must be defined"), + Field(description=("optional specify whether the ConfigMap or its keys must be defined")), ] = None @@ -2474,10 +2789,10 @@ class ConfigMapVolumeSource(BaseModel): Field( alias="defaultMode", description=( - "Optional: mode bits used to set permissions on created files by" - " default. Must be an octal value between 0000 and 0777 or a decimal" - " value between 0 and 511. YAML accepts both octal and decimal values," - " JSON requires decimal values for mode bits. Defaults to 0644." + "defaultMode is optional: mode bits used to set permissions on created" + " files by default. Must be an octal value between 0000 and 0777 or a" + " decimal value between 0 and 511. YAML accepts both octal and decimal" + " values, JSON requires decimal values for mode bits. Defaults to 0644." " Directories within the path are not affected by this setting. This" " might be in conflict with other options that affect the file mode," " like fsGroup, and the result can be other mode bits set." @@ -2488,7 +2803,7 @@ class ConfigMapVolumeSource(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items if unspecified, each key-value pair in the Data field of the" " referenced ConfigMap will be projected into the volume as a file" " whose name is the key and content is the value. If specified, the" " listed keys will be projected into the specified paths, and unlisted" @@ -2503,14 +2818,16 @@ class ConfigMapVolumeSource(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the ConfigMap or its keys must be defined"), + Field(description=("optional specify whether the ConfigMap or its keys must be defined")), ] = None @@ -2572,15 +2889,8 @@ class HTTPGetAction(BaseModel): ), ] scheme: Annotated[ - Optional[Scheme], - Field( - description=( - "Scheme to use for connecting to the host. Defaults to" - ' HTTP.\n\nPossible enum values:\n - `"HTTP"` means that the scheme' - ' used will be http://\n - `"HTTPS"` means that the scheme used will be' - " https://" - ) - ), + Optional[str], + Field(description="Scheme to use for connecting to the host. Defaults to HTTP."), ] = None @@ -2594,73 +2904,52 @@ class NodeSelector(BaseModel): ] -class PersistentVolumeClaimStatus(BaseModel): - access_modes: Annotated[ - Optional[List[str]], - Field( - alias="accessModes", - description=( - "AccessModes contains the actual access modes the volume backing the" - " PVC has. More info:" - " https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1" - ), - ), - ] = None - allocated_resources: Annotated[ - Optional[Dict[str, resource.Quantity]], +class ClusterTrustBundleProjection(BaseModel): + label_selector: Annotated[ + Optional[v1.LabelSelector], Field( - alias="allocatedResources", + alias="labelSelector", description=( - "The storage resource within AllocatedResources tracks the capacity" - " allocated to a PVC. It may be larger than the actual capacity when a" - " volume expansion operation is requested. For storage quota, the" - " larger value from allocatedResources and PVC.spec.resources is used." - " If allocatedResources is not set, PVC.spec.resources alone is used" - " for quota calculation. If a volume expansion capacity request is" - " lowered, allocatedResources is only lowered if there are no expansion" - " operations in progress and if the actual volume capacity is equal or" - " lower than the requested capacity. This is an alpha field and" - " requires enabling RecoverVolumeExpansionFailure feature." + "Select all ClusterTrustBundles that match this label selector. Only" + " has effect if signerName is set. Mutually-exclusive with name. If" + ' unset, interpreted as "match nothing". If set but empty, interpreted' + ' as "match everything".' ), ), ] = None - capacity: Annotated[ - Optional[Dict[str, resource.Quantity]], - Field(description="Represents the actual resources of the underlying volume."), - ] = None - conditions: Annotated[ - Optional[List[PersistentVolumeClaimCondition]], + name: Annotated[ + Optional[str], Field( description=( - "Current Condition of persistent volume claim. If underlying persistent" - " volume is being resized then the Condition will be set to" - " 'ResizeStarted'." + "Select a single ClusterTrustBundle by object name. Mutually-exclusive" + " with signerName and labelSelector." ) ), ] = None - phase: Annotated[ - Optional[Phase], + optional: Annotated[ + Optional[bool], Field( description=( - "Phase represents the current phase of" - ' PersistentVolumeClaim.\n\nPossible enum values:\n - `"Bound"` used' - ' for PersistentVolumeClaims that are bound\n - `"Lost"` used for' - " PersistentVolumeClaims that lost their underlying PersistentVolume." - " The claim was bound to a PersistentVolume and this volume does not" - ' exist any longer and all data on it was lost.\n - `"Pending"` used' - " for PersistentVolumeClaims that are not yet bound" + "If true, don't block pod startup if the referenced" + " ClusterTrustBundle(s) aren't available. If using name, then the" + " named ClusterTrustBundle is allowed not to exist. If using" + " signerName, then the combination of signerName and labelSelector is" + " allowed to match zero ClusterTrustBundles." ) ), ] = None - resize_status: Annotated[ + path: Annotated[ + str, + Field(description="Relative path from the volume root to write the bundle."), + ] + signer_name: Annotated[ Optional[str], Field( - alias="resizeStatus", + alias="signerName", description=( - "ResizeStatus stores status of resize operation. ResizeStatus is not" - " set by default but when expansion is complete resizeStatus is set to" - " empty string by resize controller or kubelet. This is an alpha field" - " and requires enabling RecoverVolumeExpansionFailure feature." + "Select all ClusterTrustBundles that match this signer name." + " Mutually-exclusive with name. The contents of all selected" + " ClusterTrustBundles will be unified and deduplicated." ), ), ] = None @@ -2671,7 +2960,48 @@ class PodAffinityTerm(BaseModel): Optional[v1.LabelSelector], Field( alias="labelSelector", - description="A label query over a set of resources, in this case pods.", + description=( + "A label query over a set of resources, in this case pods. If it's" + " null, this PodAffinityTerm matches with no Pods." + ), + ), + ] = None + match_label_keys: Annotated[ + Optional[List[str]], + Field( + alias="matchLabelKeys", + description=( + "MatchLabelKeys is a set of pod label keys to select which pods will be" + " taken into consideration. The keys are used to lookup values from the" + " incoming pod labels, those key-value labels are merged with" + " `labelSelector` as `key in (value)` to select the group of existing" + " pods which pods will be taken into consideration for the incoming" + " pod's pod (anti) affinity. Keys that don't exist in the incoming pod" + " labels will be ignored. The default value is empty. The same key is" + " forbidden to exist in both matchLabelKeys and labelSelector. Also," + " matchLabelKeys cannot be set when labelSelector isn't set. This is an" + " alpha field and requires enabling MatchLabelKeysInPodAffinity feature" + " gate." + ), + ), + ] = None + mismatch_label_keys: Annotated[ + Optional[List[str]], + Field( + alias="mismatchLabelKeys", + description=( + "MismatchLabelKeys is a set of pod label keys to select which pods will" + " be taken into consideration. The keys are used to lookup values from" + " the incoming pod labels, those key-value labels are merged with" + " `labelSelector` as `key notin (value)` to select the group of" + " existing pods which pods will be taken into consideration for the" + " incoming pod's pod (anti) affinity. Keys that don't exist in the" + " incoming pod labels will be ignored. The default value is empty. The" + " same key is forbidden to exist in both mismatchLabelKeys and" + " labelSelector. Also, mismatchLabelKeys cannot be set when" + " labelSelector isn't set. This is an alpha field and requires enabling" + " MatchLabelKeysInPodAffinity feature gate." + ), ), ] = None namespace_selector: Annotated[ @@ -2683,8 +3013,7 @@ class PodAffinityTerm(BaseModel): " 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 beta-level and is" - " only honored when PodAffinityNamespaceSelector feature is enabled." + " selector ({}) matches all namespaces." ), ), ] = None @@ -2696,7 +3025,7 @@ class PodAffinityTerm(BaseModel): " 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"' + ' namespace".' ) ), ] = None @@ -2756,7 +3085,7 @@ class PersistentVolumeClaimSpec(BaseModel): Field( alias="accessModes", description=( - "AccessModes contains the desired access modes the volume should have." + "accessModes contains the desired access modes the volume should have." " More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1" ), @@ -2767,47 +3096,56 @@ class PersistentVolumeClaimSpec(BaseModel): Field( alias="dataSource", description=( - "This field can be used to specify either: * An existing VolumeSnapshot" - " object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC" - " (PersistentVolumeClaim) If the provisioner or an external controller" - " can support the specified data source, it will create a new volume" - " based on the contents of the specified data source. If the" - " AnyVolumeDataSource feature gate is enabled, this field will always" - " have the same contents as the DataSourceRef field." + "dataSource field can be used to specify either: * An existing" + " VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An" + " existing PVC (PersistentVolumeClaim) If the provisioner or an" + " external controller can support the specified data source, it will" + " create a new volume based on the contents of the specified data" + " source. When the AnyVolumeDataSource feature gate is enabled," + " dataSource contents will be copied to dataSourceRef, and" + " dataSourceRef contents will be copied to dataSource when" + " dataSourceRef.namespace is not specified. If the namespace is" + " specified, then dataSourceRef will not be copied to dataSource." ), ), ] = None data_source_ref: Annotated[ - Optional[TypedLocalObjectReference], + Optional[TypedObjectReference], Field( alias="dataSourceRef", description=( - "Specifies the object from which to populate the volume with data, if a" - " non-empty volume is desired. This may be any local object from a" - " non-empty API group (non core object) or a PersistentVolumeClaim" - " object. When this field is specified, volume binding will only" - " succeed if the type of the specified object matches some installed" - " volume populator or dynamic provisioner. This field will replace the" - " functionality of the DataSource field and as such if both fields are" - " non-empty, they must have the same value. For backwards" - " compatibility, both fields (DataSource and DataSourceRef) will be set" + "dataSourceRef specifies the object from which to populate the volume" + " with data, if a non-empty volume is desired. This may be any object" + " from a non-empty API group (non core object) or a" + " PersistentVolumeClaim object. When this field is specified, volume" + " binding will only succeed if the type of the specified object matches" + " some installed volume populator or dynamic provisioner. This field" + " will replace the functionality of the dataSource field and as such if" + " both fields are non-empty, they must have the same value. For" + " backwards compatibility, when namespace isn't specified in" + " dataSourceRef, both fields (dataSource and dataSourceRef) will be set" " to the same value automatically if one of them is empty and the other" - " is non-empty. There are two important differences between DataSource" - " and DataSourceRef: * While DataSource only allows two specific types" - " of objects, DataSourceRef\n allows any non-core object, as well as" - " PersistentVolumeClaim objects.\n* While DataSource ignores disallowed" - " values (dropping them), DataSourceRef\n preserves all values, and" - " generates an error if a disallowed value is\n specified.\n(Alpha)" - " Using this field requires the AnyVolumeDataSource feature gate to be" - " enabled." + " is non-empty. When namespace is specified in dataSourceRef," + " dataSource isn't set to the same value and must be empty. There are" + " three important differences between dataSource and dataSourceRef: *" + " While dataSource only allows two specific types of objects," + " dataSourceRef\n allows any non-core object, as well as" + " PersistentVolumeClaim objects.\n* While dataSource ignores disallowed" + " values (dropping them), dataSourceRef\n preserves all values, and" + " generates an error if a disallowed value is\n specified.\n* While" + " dataSource only allows local objects, dataSourceRef allows objects\n " + " in any namespaces.\n(Beta) Using this field requires the" + " AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the" + " namespace field of dataSourceRef requires the" + " CrossNamespaceVolumeDataSource feature gate to be enabled." ), ), ] = None resources: Annotated[ - Optional[ResourceRequirements], + Optional[VolumeResourceRequirements], Field( description=( - "Resources represents the minimum resources the volume should have. If" + "resources represents the minimum resources the volume should have. If" " RecoverVolumeExpansionFailure feature is enabled users are allowed to" " specify resource requirements that are lower than previous value but" " must still be higher than capacity recorded in the status field of" @@ -2818,18 +3156,44 @@ class PersistentVolumeClaimSpec(BaseModel): ] = None selector: Annotated[ Optional[v1.LabelSelector], - Field(description="A label query over volumes to consider for binding."), + Field(description=("selector is a label query over volumes to consider for binding.")), ] = None storage_class_name: Annotated[ Optional[str], Field( alias="storageClassName", description=( - "Name of the StorageClass required by the claim. More info:" + "storageClassName is the name of the StorageClass required by the" + " claim. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1" ), ), ] = None + volume_attributes_class_name: Annotated[ + Optional[str], + Field( + alias="volumeAttributesClassName", + description=( + "volumeAttributesClassName may be used to set the VolumeAttributesClass" + " used by this claim. If specified, the CSI driver will create or" + " update the volume with the attributes defined in the corresponding" + " VolumeAttributesClass. This has a different purpose than" + " storageClassName, it can be changed after the claim is created. An" + " empty string value means that no VolumeAttributesClass will be" + " applied to the claim but it's not allowed to reset this field to" + " empty string once it is set. If unspecified and the" + " PersistentVolumeClaim is unbound, the default VolumeAttributesClass" + " will be set by the persistentvolume controller if it exists. If the" + " resource referred to by volumeAttributesClass does not exist, this" + " PersistentVolumeClaim will be set to a Pending state, as reflected by" + " the modifyVolumeStatus field, until such as a resource exists. More" + " info:" + " https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/" + " (Alpha) Using this field requires the VolumeAttributesClass feature" + " gate to be enabled." + ), + ), + ] = None volume_mode: Annotated[ Optional[str], Field( @@ -2844,35 +3208,7 @@ class PersistentVolumeClaimSpec(BaseModel): Optional[str], Field( alias="volumeName", - description=("VolumeName is the binding reference to the PersistentVolume backing" " this claim."), - ), - ] = None - - -class VolumeProjection(BaseModel): - config_map: Annotated[ - Optional[ConfigMapProjection], - Field( - alias="configMap", - description="information about the configMap data to project", - ), - ] = None - downward_api: Annotated[ - Optional[DownwardAPIProjection], - Field( - alias="downwardAPI", - description="information about the downwardAPI data to project", - ), - ] = None - secret: Annotated[ - Optional[SecretProjection], - Field(description="information about the secret data to project"), - ] = None - service_account_token: Annotated[ - Optional[ServiceAccountTokenProjection], - Field( - alias="serviceAccountToken", - description="information about the serviceAccountToken data to project", + description=("volumeName is the binding reference to the PersistentVolume backing" " this claim."), ), ] = None @@ -2886,6 +3222,12 @@ class LifecycleHandler(BaseModel): description="HTTPGet specifies the http request to perform.", ), ] = None + sleep: Annotated[ + Optional[SleepAction], + Field( + description=("Sleep represents the duration that the container should sleep before" " being terminated.") + ), + ] = None tcp_socket: Annotated[ Optional[TCPSocketAction], Field( @@ -2914,12 +3256,7 @@ class Probe(BaseModel): ] = None grpc: Annotated[ Optional[GRPCAction], - Field( - description=( - "GRPC specifies an action involving a GRPC port. This is an alpha field" - " and requires enabling GRPCContainerProbe feature gate." - ) - ), + Field(description="GRPC specifies an action involving a GRPC port."), ] = None http_get: Annotated[ Optional[HTTPGetAction], @@ -2998,6 +3335,52 @@ class Probe(BaseModel): ] = None +class VolumeProjection(BaseModel): + cluster_trust_bundle: Annotated[ + Optional[ClusterTrustBundleProjection], + Field( + alias="clusterTrustBundle", + description=( + "ClusterTrustBundle allows a pod to access the `.spec.trustBundle`" + " field of ClusterTrustBundle objects in an auto-updating" + " file.\n\nAlpha, gated by the ClusterTrustBundleProjection feature" + " gate.\n\nClusterTrustBundle objects can either be selected by name," + " or by the combination of signer name and a label selector.\n\nKubelet" + " performs aggressive normalization of the PEM contents written into" + " the pod filesystem. Esoteric PEM features such as inter-block" + " comments and block headers are stripped. Certificates are" + " deduplicated. The ordering of certificates within the file is" + " arbitrary, and Kubelet may change the order over time." + ), + ), + ] = None + config_map: Annotated[ + Optional[ConfigMapProjection], + Field( + alias="configMap", + description="configMap information about the configMap data to project", + ), + ] = None + downward_api: Annotated[ + Optional[DownwardAPIProjection], + Field( + alias="downwardAPI", + description="downwardAPI information about the downwardAPI data to project", + ), + ] = None + secret: Annotated[ + Optional[SecretProjection], + Field(description="secret information about the secret data to project"), + ] = None + service_account_token: Annotated[ + Optional[ServiceAccountTokenProjection], + Field( + alias="serviceAccountToken", + description=("serviceAccountToken is information about the serviceAccountToken data" " to project"), + ), + ] = None + + class WeightedPodAffinityTerm(BaseModel): pod_affinity_term: Annotated[ PodAffinityTerm, @@ -3158,7 +3541,7 @@ class PersistentVolumeClaim(BaseModel): Optional[PersistentVolumeClaimSpec], Field( description=( - "Spec defines the desired characteristics of a volume requested by a" + "spec defines the desired characteristics of a volume requested by a" " pod author. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ) @@ -3168,7 +3551,7 @@ class PersistentVolumeClaim(BaseModel): Optional[PersistentVolumeClaimStatus], Field( description=( - "Status represents the current information/status of a persistent" + "status represents the current information/status of a persistent" " volume claim. Read-only. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ) @@ -3266,10 +3649,10 @@ class Container(BaseModel): Optional[List[str]], Field( description=( - "Arguments to the entrypoint. The docker image's CMD is used if this" - " is not provided. Variable references $(VAR_NAME) are expanded using" - " the container's environment. If a variable cannot be resolved, the" - " reference in the input string will be unchanged. Double $$ are" + "Arguments to the entrypoint. The container image's CMD is used if" + " this is not provided. Variable references $(VAR_NAME) are expanded" + " using the container's environment. If a variable cannot be resolved," + " the reference in the input string will be unchanged. Double $$ are" " reduced to a single $, which allows for escaping the $(VAR_NAME)" ' syntax: i.e. "$$(VAR_NAME)" will produce the string literal' ' "$(VAR_NAME)". Escaped references will never be expanded, regardless' @@ -3282,7 +3665,7 @@ class Container(BaseModel): Optional[List[str]], Field( description=( - "Entrypoint array. Not executed within a shell. The docker image's" + "Entrypoint array. Not executed within a shell. The container image's" " ENTRYPOINT is used if this is not provided. Variable references" " $(VAR_NAME) are expanded using the container's environment. If a" " variable cannot be resolved, the reference in the input string will" @@ -3317,7 +3700,7 @@ class Container(BaseModel): str, Field( description=( - "Docker image name. More info:" + "Container image name. More info:" " https://kubernetes.io/docs/concepts/containers/images This field is" " optional to allow higher level config management to default or" " override container images in workload controllers like Deployments" @@ -3333,14 +3716,7 @@ class Container(BaseModel): "Image pull policy. One of Always, Never, IfNotPresent. Defaults to" " Always if :latest tag is specified, or IfNotPresent otherwise. Cannot" " be updated. More info:" - " https://kubernetes.io/docs/concepts/containers/images#updating-images\n\nPossible" - ' enum values:\n - `"Always"` means that kubelet always attempts to' - " pull the latest image. Container will fail If the pull fails.\n -" - ' `"IfNotPresent"` means that kubelet pulls if the image isn\'t present' - " on disk. Container will fail if the image isn't present and the pull" - ' fails.\n - `"Never"` means that kubelet never pulls an image, but' - " only uses a local image. Container will fail if the image isn't" - " present" + " https://kubernetes.io/docs/concepts/containers/images#updating-images" ), ), ] = None @@ -3377,12 +3753,13 @@ class Container(BaseModel): Optional[List[ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -3398,6 +3775,13 @@ class Container(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[ResourceRequirements], Field( @@ -3408,6 +3792,30 @@ class Container(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[SecurityContext], Field( @@ -3479,7 +3887,7 @@ class Container(BaseModel): ), ] = None termination_message_policy: Annotated[ - Optional[TerminationMessagePolicy], + Optional[str], Field( alias="terminationMessagePolicy", description=( @@ -3489,13 +3897,7 @@ class Container(BaseModel): " will use the last chunk of container log output if the termination" " message file is empty and the container exited with an error. The log" " output is limited to 2048 bytes or 80 lines, whichever is smaller." - " Defaults to File. Cannot be updated.\n\nPossible enum values:\n -" - ' `"FallbackToLogsOnError"` will read the most recent contents of the' - " container logs for the container status message when the container" - " exits with an error and the terminationMessagePath has no contents.\n" - ' - `"File"` is the default behavior and will set the container status' - " message to the contents of the container's terminationMessagePath" - " when the container exits." + " Defaults to File. Cannot be updated." ), ), ] = None @@ -3615,19 +4017,19 @@ class ProjectedVolumeSource(BaseModel): Field( alias="defaultMode", description=( - "Mode bits used to set permissions on created files by default. Must be" - " an octal value between 0000 and 0777 or a decimal value between 0 and" - " 511. YAML accepts both octal and decimal values, JSON requires" - " decimal values for mode bits. Directories within the path are not" - " affected by this setting. This might be in conflict with other" - " options that affect the file mode, like fsGroup, and the result can" - " be other mode bits set." + "defaultMode are the mode bits used to set permissions on created files" + " by default. Must be an octal value between 0000 and 0777 or a decimal" + " value between 0 and 511. YAML accepts both octal and decimal values," + " JSON requires decimal values for mode bits. Directories within the" + " path are not affected by this setting. This might be in conflict with" + " other options that affect the file mode, like fsGroup, and the result" + " can be other mode bits set." ), ), ] = None sources: Annotated[ Optional[List[VolumeProjection]], - Field(description="list of volume projections"), + Field(description="sources is the list of volume projections"), ] = None @@ -3667,7 +4069,7 @@ class Volume(BaseModel): Field( alias="awsElasticBlockStore", description=( - "AWSElasticBlockStore represents an AWS Disk resource that is attached" + "awsElasticBlockStore represents an AWS Disk resource that is attached" " to a kubelet's host machine and then exposed to the pod. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), @@ -3677,25 +4079,25 @@ class Volume(BaseModel): Optional[AzureDiskVolumeSource], Field( alias="azureDisk", - description=("AzureDisk represents an Azure Data Disk mount on the host and bind" " mount to the pod."), + description=("azureDisk represents an Azure Data Disk mount on the host and bind" " mount to the pod."), ), ] = None azure_file: Annotated[ Optional[AzureFileVolumeSource], Field( alias="azureFile", - description=("AzureFile represents an Azure File Service mount on the host and bind" " mount to the pod."), + description=("azureFile represents an Azure File Service mount on the host and bind" " mount to the pod."), ), ] = None cephfs: Annotated[ Optional[CephFSVolumeSource], - Field(description=("CephFS represents a Ceph FS mount on the host that shares a pod's" " lifetime")), + Field(description=("cephFS represents a Ceph FS mount on the host that shares a pod's" " lifetime")), ] = None cinder: Annotated[ Optional[CinderVolumeSource], Field( description=( - "Cinder represents a cinder volume attached and mounted on kubelets" + "cinder represents a cinder volume attached and mounted on kubelets" " host machine. More info:" " https://examples.k8s.io/mysql-cinder-pd/README.md" ) @@ -3705,14 +4107,14 @@ class Volume(BaseModel): Optional[ConfigMapVolumeSource], Field( alias="configMap", - description=("ConfigMap represents a configMap that should populate this volume"), + description=("configMap represents a configMap that should populate this volume"), ), ] = None csi: Annotated[ Optional[CSIVolumeSource], Field( description=( - "CSI (Container Storage Interface) represents ephemeral storage that is" + "csi (Container Storage Interface) represents ephemeral storage that is" " handled by certain external CSI drivers (Beta feature)." ) ), @@ -3721,7 +4123,7 @@ class Volume(BaseModel): Optional[DownwardAPIVolumeSource], Field( alias="downwardAPI", - description=("DownwardAPI represents downward API about the pod that should populate" " this volume"), + description=("downwardAPI represents downward API about the pod that should populate" " this volume"), ), ] = None empty_dir: Annotated[ @@ -3729,7 +4131,7 @@ class Volume(BaseModel): Field( alias="emptyDir", description=( - "EmptyDir represents a temporary directory that shares a pod's" + "emptyDir represents a temporary directory that shares a pod's" " lifetime. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#emptydir" ), @@ -3739,7 +4141,7 @@ class Volume(BaseModel): Optional[EphemeralVolumeSource], Field( description=( - "Ephemeral represents a volume that is handled by a cluster storage" + "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" @@ -3762,7 +4164,7 @@ class Volume(BaseModel): Optional[FCVolumeSource], Field( description=( - "FC represents a Fibre Channel resource that is attached to a kubelet's" + "fc represents a Fibre Channel resource that is attached to a kubelet's" " host machine and then exposed to the pod." ) ), @@ -3772,7 +4174,7 @@ class Volume(BaseModel): Field( alias="flexVolume", description=( - "FlexVolume represents a generic volume resource that is" + "flexVolume represents a generic volume resource that is" " provisioned/attached using an exec based plugin." ), ), @@ -3781,7 +4183,7 @@ class Volume(BaseModel): Optional[FlockerVolumeSource], Field( description=( - "Flocker represents a Flocker volume attached to a kubelet's host" + "flocker represents a Flocker volume attached to a kubelet's host" " machine. This depends on the Flocker control service being running" ) ), @@ -3791,7 +4193,7 @@ class Volume(BaseModel): Field( alias="gcePersistentDisk", description=( - "GCEPersistentDisk represents a GCE Disk resource that is attached to a" + "gcePersistentDisk represents a GCE Disk resource that is attached to a" " kubelet's host machine and then exposed to the pod. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), @@ -3802,7 +4204,7 @@ class Volume(BaseModel): Field( alias="gitRepo", description=( - "GitRepo represents a git repository at a particular revision." + "gitRepo represents a git repository at a particular revision." " DEPRECATED: GitRepo is deprecated. To provision a container with a" " git repo, mount an EmptyDir into an InitContainer that clones the" " repo using git, then mount the EmptyDir into the Pod's container." @@ -3813,7 +4215,7 @@ class Volume(BaseModel): Optional[GlusterfsVolumeSource], Field( description=( - "Glusterfs represents a Glusterfs mount on the host that shares a pod's" + "glusterfs represents a Glusterfs mount on the host that shares a pod's" " lifetime. More info:" " https://examples.k8s.io/volumes/glusterfs/README.md" ) @@ -3824,7 +4226,7 @@ class Volume(BaseModel): Field( alias="hostPath", description=( - "HostPath represents a pre-existing file or directory on the host" + "hostPath represents a pre-existing file or directory on the host" " machine that is directly exposed to the container. This is generally" " used for system agents or other privileged things that are allowed to" " see the host machine. Most containers will NOT need this. More info:" @@ -3836,7 +4238,7 @@ class Volume(BaseModel): Optional[ISCSIVolumeSource], Field( description=( - "ISCSI represents an ISCSI Disk resource that is attached to a" + "iscsi represents an ISCSI Disk resource that is attached to a" " kubelet's host machine and then exposed to the pod. More info:" " https://examples.k8s.io/volumes/iscsi/README.md" ) @@ -3846,8 +4248,8 @@ class Volume(BaseModel): str, Field( description=( - "Volume's name. Must be a DNS_LABEL and unique within the pod. More" - " info:" + "name of the volume. Must be a DNS_LABEL and unique within the pod." + " More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -3856,7 +4258,7 @@ class Volume(BaseModel): Optional[NFSVolumeSource], Field( description=( - "NFS represents an NFS mount on the host that shares a pod's lifetime" + "nfs represents an NFS mount on the host that shares a pod's lifetime" " More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs" ) ), @@ -3866,7 +4268,7 @@ class Volume(BaseModel): Field( alias="persistentVolumeClaim", description=( - "PersistentVolumeClaimVolumeSource represents a reference to a" + "persistentVolumeClaimVolumeSource represents a reference to a" " PersistentVolumeClaim in the same namespace. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ), @@ -3877,7 +4279,7 @@ class Volume(BaseModel): Field( alias="photonPersistentDisk", description=( - "PhotonPersistentDisk represents a PhotonController persistent disk" + "photonPersistentDisk represents a PhotonController persistent disk" " attached and mounted on kubelets host machine" ), ), @@ -3887,23 +4289,23 @@ class Volume(BaseModel): Field( alias="portworxVolume", description=( - "PortworxVolume represents a portworx volume attached and mounted on" " kubelets host machine" + "portworxVolume represents a portworx volume attached and mounted on" " kubelets host machine" ), ), ] = None projected: Annotated[ Optional[ProjectedVolumeSource], - Field(description=("Items for all in one resources secrets, configmaps, and downward API")), + Field(description=("projected items for all in one resources secrets, configmaps, and" " downward API")), ] = None quobyte: Annotated[ Optional[QuobyteVolumeSource], - Field(description=("Quobyte represents a Quobyte mount on the host that shares a pod's" " lifetime")), + Field(description=("quobyte represents a Quobyte mount on the host that shares a pod's" " lifetime")), ] = None rbd: Annotated[ Optional[RBDVolumeSource], Field( description=( - "RBD represents a Rados Block Device mount on the host that shares a" + "rbd represents a Rados Block Device mount on the host that shares a" " pod's lifetime. More info:" " https://examples.k8s.io/volumes/rbd/README.md" ) @@ -3914,7 +4316,7 @@ class Volume(BaseModel): Field( alias="scaleIO", description=( - "ScaleIO represents a ScaleIO persistent volume attached and mounted on" " Kubernetes nodes." + "scaleIO represents a ScaleIO persistent volume attached and mounted on" " Kubernetes nodes." ), ), ] = None @@ -3922,19 +4324,19 @@ class Volume(BaseModel): Optional[SecretVolumeSource], Field( description=( - "Secret represents a secret that should populate this volume. More" + "secret represents a secret that should populate this volume. More" " info: https://kubernetes.io/docs/concepts/storage/volumes#secret" ) ), ] = None storageos: Annotated[ Optional[StorageOSVolumeSource], - Field(description=("StorageOS represents a StorageOS volume attached and mounted on" " Kubernetes nodes.")), + Field(description=("storageOS represents a StorageOS volume attached and mounted on" " Kubernetes nodes.")), ] = None vsphere_volume: Annotated[ Optional[VsphereVirtualDiskVolumeSource], Field( alias="vsphereVolume", - description=("VsphereVolume represents a vSphere volume attached and mounted on" " kubelets host machine"), + description=("vsphereVolume represents a vSphere volume attached and mounted on" " kubelets host machine"), ), ] = None diff --git a/src/hera/events/models/io/k8s/api/core/v1.pyi b/src/hera/events/models/io/k8s/api/core/v1.pyi deleted file mode 100644 index bb112abd7..000000000 --- a/src/hera/events/models/io/k8s/api/core/v1.pyi +++ /dev/null @@ -1,640 +0,0 @@ -from enum import Enum -from typing import Dict, List, Optional - -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -from ...apimachinery.pkg.api import resource as resource -from ...apimachinery.pkg.apis.meta import v1 as v1 -from ...apimachinery.pkg.util import intstr as intstr - -class AWSElasticBlockStoreVolumeSource(BaseModel): - fs_type: Optional[str] - partition: Optional[int] - read_only: Optional[bool] - volume_id: str - -class AzureDiskVolumeSource(BaseModel): - caching_mode: Optional[str] - disk_name: str - disk_uri: str - fs_type: Optional[str] - kind: Optional[str] - read_only: Optional[bool] - -class AzureFileVolumeSource(BaseModel): - read_only: Optional[bool] - secret_name: str - share_name: str - -class Capabilities(BaseModel): - add: Optional[List[str]] - drop: Optional[List[str]] - -class ConfigMapEnvSource(BaseModel): - name: Optional[str] - optional: Optional[bool] - -class ConfigMapKeySelector(BaseModel): - key: str - name: Optional[str] - optional: Optional[bool] - -class TerminationMessagePolicy(Enum): - fallback_to_logs_on_error: str - file: str - -class Protocol(Enum): - sctp: str - tcp: str - udp: str - -class ContainerPort(BaseModel): - container_port: int - host_ip: Optional[str] - host_port: Optional[int] - name: Optional[str] - protocol: Optional[Protocol] - -class EventSource(BaseModel): - component: Optional[str] - host: Optional[str] - -class ExecAction(BaseModel): - command: Optional[List[str]] - -class FCVolumeSource(BaseModel): - fs_type: Optional[str] - lun: Optional[int] - read_only: Optional[bool] - target_ww_ns: Optional[List[str]] - wwids: Optional[List[str]] - -class FlockerVolumeSource(BaseModel): - dataset_name: Optional[str] - dataset_uuid: Optional[str] - -class GCEPersistentDiskVolumeSource(BaseModel): - fs_type: Optional[str] - partition: Optional[int] - pd_name: str - read_only: Optional[bool] - -class GRPCAction(BaseModel): - port: int - service: Optional[str] - -class GitRepoVolumeSource(BaseModel): - directory: Optional[str] - repository: str - revision: Optional[str] - -class GlusterfsVolumeSource(BaseModel): - endpoints: str - path: str - read_only: Optional[bool] - -class Scheme(Enum): - http: str - https: str - -class HTTPHeader(BaseModel): - name: str - value: str - -class HostAlias(BaseModel): - hostnames: Optional[List[str]] - ip: Optional[str] - -class HostPathVolumeSource(BaseModel): - path: str - type: Optional[str] - -class KeyToPath(BaseModel): - key: str - mode: Optional[int] - path: str - -class LocalObjectReference(BaseModel): - name: Optional[str] - -class NFSVolumeSource(BaseModel): - path: str - read_only: Optional[bool] - server: str - -class Operator(Enum): - does_not_exist: str - exists: str - gt: str - in_: str - lt: str - not_in: str - -class NodeSelectorRequirement(BaseModel): - key: str - operator: Operator - values: Optional[List[str]] - -class NodeSelectorTerm(BaseModel): - match_expressions: Optional[List[NodeSelectorRequirement]] - match_fields: Optional[List[NodeSelectorRequirement]] - -class ObjectFieldSelector(BaseModel): - api_version: Optional[str] - field_path: str - -class ObjectReference(BaseModel): - api_version: Optional[str] - field_path: Optional[str] - kind: Optional[str] - name: Optional[str] - namespace: Optional[str] - resource_version: Optional[str] - uid: Optional[str] - -class Type(Enum): - file_system_resize_pending: str - resizing: str - -class Phase(Enum): - bound: str - lost: str - pending: str - -class PersistentVolumeClaimVolumeSource(BaseModel): - claim_name: str - read_only: Optional[bool] - -class PhotonPersistentDiskVolumeSource(BaseModel): - fs_type: Optional[str] - pd_id: str - -class PodDNSConfigOption(BaseModel): - name: Optional[str] - value: Optional[str] - -class PortworxVolumeSource(BaseModel): - fs_type: Optional[str] - read_only: Optional[bool] - volume_id: str - -class PreferredSchedulingTerm(BaseModel): - preference: NodeSelectorTerm - weight: int - -class QuobyteVolumeSource(BaseModel): - group: Optional[str] - read_only: Optional[bool] - registry: str - tenant: Optional[str] - user: Optional[str] - volume: str - -class RBDVolumeSource(BaseModel): - fs_type: Optional[str] - image: str - keyring: Optional[str] - monitors: List[str] - pool: Optional[str] - read_only: Optional[bool] - secret_ref: Optional[LocalObjectReference] - user: Optional[str] - -class SELinuxOptions(BaseModel): - level: Optional[str] - role: Optional[str] - type: Optional[str] - user: Optional[str] - -class ScaleIOVolumeSource(BaseModel): - fs_type: Optional[str] - gateway: str - protection_domain: Optional[str] - read_only: Optional[bool] - secret_ref: LocalObjectReference - ssl_enabled: Optional[bool] - storage_mode: Optional[str] - storage_pool: Optional[str] - system: str - volume_name: Optional[str] - -class TypeModel(Enum): - localhost: str - runtime_default: str - unconfined: str - -class SeccompProfile(BaseModel): - localhost_profile: Optional[str] - type: TypeModel - -class SecretEnvSource(BaseModel): - name: Optional[str] - optional: Optional[bool] - -class SecretKeySelector(BaseModel): - key: str - name: Optional[str] - optional: Optional[bool] - -class SecretProjection(BaseModel): - items: Optional[List[KeyToPath]] - name: Optional[str] - optional: Optional[bool] - -class SecretVolumeSource(BaseModel): - default_mode: Optional[int] - items: Optional[List[KeyToPath]] - optional: Optional[bool] - secret_name: Optional[str] - -class ServiceAccountTokenProjection(BaseModel): - audience: Optional[str] - expiration_seconds: Optional[int] - path: str - -class StorageOSVolumeSource(BaseModel): - fs_type: Optional[str] - read_only: Optional[bool] - secret_ref: Optional[LocalObjectReference] - volume_name: Optional[str] - volume_namespace: Optional[str] - -class Sysctl(BaseModel): - name: str - value: str - -class Effect(Enum): - no_execute: str - no_schedule: str - prefer_no_schedule: str - -class OperatorModel(Enum): - equal: str - exists: str - -class Toleration(BaseModel): - effect: Optional[Effect] - key: Optional[str] - operator: Optional[OperatorModel] - toleration_seconds: Optional[int] - value: Optional[str] - -class TypedLocalObjectReference(BaseModel): - api_group: Optional[str] - kind: str - name: str - -class VolumeDevice(BaseModel): - device_path: str - name: str - -class VolumeMount(BaseModel): - mount_path: str - mount_propagation: Optional[str] - name: str - read_only: Optional[bool] - sub_path: Optional[str] - sub_path_expr: Optional[str] - -class VsphereVirtualDiskVolumeSource(BaseModel): - fs_type: Optional[str] - storage_policy_id: Optional[str] - storage_policy_name: Optional[str] - volume_path: str - -class WindowsSecurityContextOptions(BaseModel): - gmsa_credential_spec: Optional[str] - gmsa_credential_spec_name: Optional[str] - host_process: Optional[bool] - run_as_user_name: Optional[str] - -class ImagePullPolicy(Enum): - always: str - never: str - if_not_present: str - -class CSIVolumeSource(BaseModel): - driver: str - fs_type: Optional[str] - node_publish_secret_ref: Optional[LocalObjectReference] - read_only: Optional[bool] - volume_attributes: Optional[Dict[str, str]] - -class CephFSVolumeSource(BaseModel): - monitors: List[str] - path: Optional[str] - read_only: Optional[bool] - secret_file: Optional[str] - secret_ref: Optional[LocalObjectReference] - user: Optional[str] - -class CinderVolumeSource(BaseModel): - fs_type: Optional[str] - read_only: Optional[bool] - secret_ref: Optional[LocalObjectReference] - volume_id: str - -class ConfigMapProjection(BaseModel): - items: Optional[List[KeyToPath]] - name: Optional[str] - optional: Optional[bool] - -class ConfigMapVolumeSource(BaseModel): - default_mode: Optional[int] - items: Optional[List[KeyToPath]] - name: Optional[str] - optional: Optional[bool] - -class EmptyDirVolumeSource(BaseModel): - medium: Optional[str] - size_limit: Optional[resource.Quantity] - -class EnvFromSource(BaseModel): - config_map_ref: Optional[ConfigMapEnvSource] - prefix: Optional[str] - secret_ref: Optional[SecretEnvSource] - -class EventSeries(BaseModel): - count: Optional[int] - last_observed_time: Optional[v1.MicroTime] - -class FlexVolumeSource(BaseModel): - driver: str - fs_type: Optional[str] - options: Optional[Dict[str, str]] - read_only: Optional[bool] - secret_ref: Optional[LocalObjectReference] - -class HTTPGetAction(BaseModel): - host: Optional[str] - http_headers: Optional[List[HTTPHeader]] - path: Optional[str] - port: int - scheme: Optional[Scheme] - -class ISCSIVolumeSource(BaseModel): - chap_auth_discovery: Optional[bool] - chap_auth_session: Optional[bool] - fs_type: Optional[str] - initiator_name: Optional[str] - iqn: str - iscsi_interface: Optional[str] - lun: int - portals: Optional[List[str]] - read_only: Optional[bool] - secret_ref: Optional[LocalObjectReference] - target_portal: str - -class NodeSelector(BaseModel): - node_selector_terms: List[NodeSelectorTerm] - -class PersistentVolumeClaimCondition(BaseModel): - last_probe_time: Optional[v1.Time] - last_transition_time: Optional[v1.Time] - message: Optional[str] - reason: Optional[str] - status: str - type: Type - -class PersistentVolumeClaimStatus(BaseModel): - access_modes: Optional[List[str]] - allocated_resources: Optional[Dict[str, resource.Quantity]] - capacity: Optional[Dict[str, resource.Quantity]] - conditions: Optional[List[PersistentVolumeClaimCondition]] - phase: Optional[Phase] - resize_status: Optional[str] - -class PodDNSConfig(BaseModel): - nameservers: Optional[List[str]] - options: Optional[List[PodDNSConfigOption]] - searches: Optional[List[str]] - -class PodSecurityContext(BaseModel): - fs_group: Optional[int] - fs_group_change_policy: Optional[str] - run_as_group: Optional[int] - run_as_non_root: Optional[bool] - run_as_user: Optional[int] - se_linux_options: Optional[SELinuxOptions] - seccomp_profile: Optional[SeccompProfile] - supplemental_groups: Optional[List[int]] - sysctls: Optional[List[Sysctl]] - windows_options: Optional[WindowsSecurityContextOptions] - -class ResourceFieldSelector(BaseModel): - container_name: Optional[str] - divisor: Optional[resource.Quantity] - resource: str - -class ResourceRequirements(BaseModel): - limits: Optional[Dict[str, resource.Quantity]] - requests: Optional[Dict[str, resource.Quantity]] - -class SecurityContext(BaseModel): - allow_privilege_escalation: Optional[bool] - capabilities: Optional[Capabilities] - privileged: Optional[bool] - proc_mount: Optional[str] - read_only_root_filesystem: Optional[bool] - run_as_group: Optional[int] - run_as_non_root: Optional[bool] - run_as_user: Optional[int] - se_linux_options: Optional[SELinuxOptions] - seccomp_profile: Optional[SeccompProfile] - windows_options: Optional[WindowsSecurityContextOptions] - -class ServicePort(BaseModel): - app_protocol: Optional[str] - name: Optional[str] - node_port: Optional[int] - port: int - protocol: Optional[Protocol] - target_port: Optional[intstr.IntOrString] - -class TCPSocketAction(BaseModel): - host: Optional[str] - port: intstr.IntOrString - -class DownwardAPIVolumeFile(BaseModel): - field_ref: Optional[ObjectFieldSelector] - mode: Optional[int] - path: str - resource_field_ref: Optional[ResourceFieldSelector] - -class DownwardAPIVolumeSource(BaseModel): - default_mode: Optional[int] - items: Optional[List[DownwardAPIVolumeFile]] - -class EnvVarSource(BaseModel): - config_map_key_ref: Optional[ConfigMapKeySelector] - field_ref: Optional[ObjectFieldSelector] - resource_field_ref: Optional[ResourceFieldSelector] - secret_key_ref: Optional[SecretKeySelector] - -class Event(BaseModel): - action: Optional[str] - api_version: Optional[str] - count: Optional[int] - event_time: Optional[v1.MicroTime] - first_timestamp: Optional[v1.Time] - involved_object: ObjectReference - kind: Optional[str] - last_timestamp: Optional[v1.Time] - message: Optional[str] - metadata: v1.ObjectMeta - reason: Optional[str] - related: Optional[ObjectReference] - reporting_component: Optional[str] - reporting_instance: Optional[str] - series: Optional[EventSeries] - source: Optional[EventSource] - type: Optional[str] - -class LifecycleHandler(BaseModel): - exec: Optional[ExecAction] - http_get: Optional[HTTPGetAction] - tcp_socket: Optional[TCPSocketAction] - -class NodeAffinity(BaseModel): - preferred_during_scheduling_ignored_during_execution: Optional[List[PreferredSchedulingTerm]] - required_during_scheduling_ignored_during_execution: Optional[NodeSelector] - -class PersistentVolumeClaimSpec(BaseModel): - access_modes: Optional[List[str]] - data_source: Optional[TypedLocalObjectReference] - data_source_ref: Optional[TypedLocalObjectReference] - resources: Optional[ResourceRequirements] - selector: Optional[v1.LabelSelector] - storage_class_name: Optional[str] - volume_mode: Optional[str] - volume_name: Optional[str] - -class PersistentVolumeClaimTemplate(BaseModel): - metadata: Optional[v1.ObjectMeta] - spec: PersistentVolumeClaimSpec - -class PodAffinityTerm(BaseModel): - label_selector: Optional[v1.LabelSelector] - namespace_selector: Optional[v1.LabelSelector] - namespaces: Optional[List[str]] - topology_key: str - -class Probe(BaseModel): - exec: Optional[ExecAction] - failure_threshold: Optional[int] - grpc: Optional[GRPCAction] - http_get: Optional[HTTPGetAction] - initial_delay_seconds: Optional[int] - period_seconds: Optional[int] - success_threshold: Optional[int] - tcp_socket: Optional[TCPSocketAction] - termination_grace_period_seconds: Optional[int] - timeout_seconds: Optional[int] - -class WeightedPodAffinityTerm(BaseModel): - pod_affinity_term: PodAffinityTerm - weight: int - -class DownwardAPIProjection(BaseModel): - items: Optional[List[DownwardAPIVolumeFile]] - -class EnvVar(BaseModel): - name: str - value: Optional[str] - value_from: Optional[EnvVarSource] - -class EphemeralVolumeSource(BaseModel): - volume_claim_template: Optional[PersistentVolumeClaimTemplate] - -class Lifecycle(BaseModel): - post_start: Optional[LifecycleHandler] - pre_stop: Optional[LifecycleHandler] - -class PersistentVolumeClaim(BaseModel): - api_version: Optional[str] - kind: Optional[str] - metadata: Optional[v1.ObjectMeta] - spec: Optional[PersistentVolumeClaimSpec] - status: Optional[PersistentVolumeClaimStatus] - -class PodAffinity(BaseModel): - preferred_during_scheduling_ignored_during_execution: Optional[List[WeightedPodAffinityTerm]] - required_during_scheduling_ignored_during_execution: Optional[List[PodAffinityTerm]] - -class PodAntiAffinity(BaseModel): - preferred_during_scheduling_ignored_during_execution: Optional[List[WeightedPodAffinityTerm]] - required_during_scheduling_ignored_during_execution: Optional[List[PodAffinityTerm]] - -class VolumeProjection(BaseModel): - config_map: Optional[ConfigMapProjection] - downward_api: Optional[DownwardAPIProjection] - secret: Optional[SecretProjection] - service_account_token: Optional[ServiceAccountTokenProjection] - -class Affinity(BaseModel): - node_affinity: Optional[NodeAffinity] - pod_affinity: Optional[PodAffinity] - pod_anti_affinity: Optional[PodAntiAffinity] - -class Container(BaseModel): - args: Optional[List[str]] - command: Optional[List[str]] - env: Optional[List[EnvVar]] - env_from: Optional[List[EnvFromSource]] - image: str - image_pull_policy: Optional[str] - lifecycle: Optional[Lifecycle] - liveness_probe: Optional[Probe] - name: Optional[str] - ports: Optional[List[ContainerPort]] - readiness_probe: Optional[Probe] - resources: Optional[ResourceRequirements] - security_context: Optional[SecurityContext] - startup_probe: Optional[Probe] - stdin: Optional[bool] - stdin_once: Optional[bool] - termination_message_path: Optional[str] - termination_message_policy: Optional[TerminationMessagePolicy] - tty: Optional[bool] - volume_devices: Optional[List[VolumeDevice]] - volume_mounts: Optional[List[VolumeMount]] - working_dir: Optional[str] - -class ProjectedVolumeSource(BaseModel): - default_mode: Optional[int] - sources: Optional[List[VolumeProjection]] - -class Volume(BaseModel): - aws_elastic_block_store: Optional[AWSElasticBlockStoreVolumeSource] - azure_disk: Optional[AzureDiskVolumeSource] - azure_file: Optional[AzureFileVolumeSource] - cephfs: Optional[CephFSVolumeSource] - cinder: Optional[CinderVolumeSource] - config_map: Optional[ConfigMapVolumeSource] - csi: Optional[CSIVolumeSource] - downward_api: Optional[DownwardAPIVolumeSource] - empty_dir: Optional[EmptyDirVolumeSource] - ephemeral: Optional[EphemeralVolumeSource] - fc: Optional[FCVolumeSource] - flex_volume: Optional[FlexVolumeSource] - flocker: Optional[FlockerVolumeSource] - gce_persistent_disk: Optional[GCEPersistentDiskVolumeSource] - git_repo: Optional[GitRepoVolumeSource] - glusterfs: Optional[GlusterfsVolumeSource] - host_path: Optional[HostPathVolumeSource] - iscsi: Optional[ISCSIVolumeSource] - name: str - nfs: Optional[NFSVolumeSource] - persistent_volume_claim: Optional[PersistentVolumeClaimVolumeSource] - photon_persistent_disk: Optional[PhotonPersistentDiskVolumeSource] - portworx_volume: Optional[PortworxVolumeSource] - projected: Optional[ProjectedVolumeSource] - quobyte: Optional[QuobyteVolumeSource] - rbd: Optional[RBDVolumeSource] - scale_io: Optional[ScaleIOVolumeSource] - secret: Optional[SecretVolumeSource] - storageos: Optional[StorageOSVolumeSource] - vsphere_volume: Optional[VsphereVirtualDiskVolumeSource] diff --git a/src/hera/events/models/io/k8s/api/policy/__init__.py b/src/hera/events/models/io/k8s/api/policy/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/io/k8s/api/policy/__init__.py +++ b/src/hera/events/models/io/k8s/api/policy/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/io/k8s/api/policy/v1.py b/src/hera/events/models/io/k8s/api/policy/v1.py index bb608704c..a4ac7ee52 100644 --- a/src/hera/events/models/io/k8s/api/policy/v1.py +++ b/src/hera/events/models/io/k8s/api/policy/v1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -47,3 +47,32 @@ class PodDisruptionBudgetSpec(BaseModel): ) ), ] = None + unhealthy_pod_eviction_policy: Annotated[ + Optional[str], + Field( + alias="unhealthyPodEvictionPolicy", + description=( + "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy" + " pods should be considered for eviction. Current implementation" + " considers healthy pods, as pods that have status.conditions item with" + ' type="Ready",status="True".\n\nValid policies are IfHealthyBudget and' + " AlwaysAllow. If no policy is specified, the default behavior will be" + " used, which corresponds to the IfHealthyBudget" + " policy.\n\nIfHealthyBudget policy means that running pods" + ' (status.phase="Running"), but not yet healthy can be evicted only if' + " the guarded application is not disrupted (status.currentHealthy is at" + " least equal to status.desiredHealthy). Healthy pods will be subject" + " to the PDB for eviction.\n\nAlwaysAllow policy means that all running" + ' pods (status.phase="Running"), but not yet healthy are considered' + " disrupted and can be evicted regardless of whether the criteria in a" + " PDB is met. This means perspective running pods of a disrupted" + " application might not get a chance to become healthy. Healthy pods" + " will be subject to the PDB for eviction.\n\nAdditional policies may" + " be added in the future. Clients making eviction decisions should" + " disallow eviction of unhealthy pods if they encounter an unrecognized" + " policy in this field.\n\nThis field is beta-level. The eviction API" + " uses this field when the feature gate PDBUnhealthyPodEvictionPolicy" + " is enabled (enabled by default)." + ), + ), + ] = None diff --git a/src/hera/events/models/io/k8s/api/policy/v1beta1.pyi b/src/hera/events/models/io/k8s/api/policy/v1beta1.pyi deleted file mode 100644 index bb510518f..000000000 --- a/src/hera/events/models/io/k8s/api/policy/v1beta1.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from typing import Optional - -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -from ...apimachinery.pkg.apis.meta import v1 as v1 -from ...apimachinery.pkg.util import intstr as intstr - -class PodDisruptionBudgetSpec(BaseModel): - max_unavailable: Optional[intstr.IntOrString] - min_available: Optional[intstr.IntOrString] - selector: Optional[v1.LabelSelector] diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/api/__init__.py b/src/hera/events/models/io/k8s/apimachinery/pkg/api/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/api/__init__.py +++ b/src/hera/events/models/io/k8s/apimachinery/pkg/api/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/api/resource.py b/src/hera/events/models/io/k8s/apimachinery/pkg/api/resource.py index 312480253..ae885cc7e 100644 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/api/resource.py +++ b/src/hera/events/models/io/k8s/apimachinery/pkg/api/resource.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -16,40 +16,40 @@ class Quantity(BaseModel): "Quantity is a fixed-point representation of a number. It provides" " convenient marshaling/unmarshaling in JSON and YAML, in addition to" " String() and AsInt64() accessors.\n\nThe serialization format" - " is:\n\n ::= \n (Note that" - ' may be empty, from the "" case in .)\n ' - " ::= 0 | 1 | ... | 9 ::= |" - " ::= | . |" - ' . | . ::= "+" | "-" ' - " ::= | ::= |" - " | ::= Ki | Mi | Gi |" - " Ti | Pi | Ei\n (International System of units; See:" - " http://physics.nist.gov/cuu/Units/binary.html)\n ::=" - ' m | "" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 =' - ' 1k; I didn\'t choose the capitalization.)\n ::= "e"' - ' | "E" \n\nNo matter which of the three' - " exponent forms is used, no quantity may represent a number greater" - " than 2^63-1 in magnitude, nor may it have more than 3 decimal places." - " Numbers larger or more precise will be capped or rounded up. (E.g.:" - " 0.1m will rounded up to 1m.) This may be extended in the future if we" - " require larger or smaller quantities.\n\nWhen a Quantity is parsed" - " from a string, it will remember the type of suffix it had, and will" - " use the same type again when it is serialized.\n\nBefore serializing," - ' Quantity will be put in "canonical form". This means that' - " Exponent/suffix will be adjusted up or down (with a corresponding" - " increase or decrease in Mantissa) such that:\n a. No precision is" - " lost\n b. No fractional digits will be emitted\n c. The exponent" - " (or suffix) is as large as possible.\nThe sign will be omitted unless" - " the number is negative.\n\nExamples:\n 1.5 will be serialized as" - ' "1500m"\n 1.5Gi will be serialized as "1536Mi"\n\nNote that the' - " quantity will NEVER be internally represented by a floating point" - " number. That is the whole point of this exercise.\n\nNon-canonical" - " values will still parse as long as they are well formed, but will be" - " re-emitted in their canonical form. (So always use canonical form, or" - " don't diff.)\n\nThis format is intended to make it difficult to use" - " these numbers without writing some sort of special handling code in" - " the hopes that that will cause implementors to also use a fixed point" - " implementation." + " is:\n\n``` ::= \n\n\t(Note" + ' that may be empty, from the "" case in' + " .)\n\n ::= 0 | 1 | ... | 9 " + " ::= | ::= |" + ' . | . | . ::= "+" |' + ' "-" ::= | ' + " ::= | | " + " ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units;" + " See: http://physics.nist.gov/cuu/Units/binary.html)\n\n " + ' ::= m | "" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but' + " 1000 = 1k; I didn't choose the capitalization.)\n\n" + ' ::= "e" | "E" ```\n\nNo matter which of' + " the three exponent forms is used, no quantity may represent a number" + " greater than 2^63-1 in magnitude, nor may it have more than 3 decimal" + " places. Numbers larger or more precise will be capped or rounded up." + " (E.g.: 0.1m will rounded up to 1m.) This may be extended in the" + " future if we require larger or smaller quantities.\n\nWhen a Quantity" + " is parsed from a string, it will remember the type of suffix it had," + " and will use the same type again when it is serialized.\n\nBefore" + ' serializing, Quantity will be put in "canonical form". This means' + " that Exponent/suffix will be adjusted up or down (with a" + " corresponding increase or decrease in Mantissa) such that:\n\n- No" + " precision is lost - No fractional digits will be emitted - The" + " exponent (or suffix) is as large as possible.\n\nThe sign will be" + " omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be" + ' serialized as "1500m" - 1.5Gi will be serialized as "1536Mi"\n\nNote' + " that the quantity will NEVER be internally represented by a floating" + " point number. That is the whole point of this" + " exercise.\n\nNon-canonical values will still parse as long as they" + " are well formed, but will be re-emitted in their canonical form. (So" + " always use canonical form, or don't diff.)\n\nThis format is" + " intended to make it difficult to use these numbers without writing" + " some sort of special handling code in the hopes that that will cause" + " implementors to also use a fixed point implementation." ) ), ] diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/api/resource.pyi b/src/hera/events/models/io/k8s/apimachinery/pkg/api/resource.pyi deleted file mode 100644 index 62e5f6b47..000000000 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/api/resource.pyi +++ /dev/null @@ -1,7 +0,0 @@ -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -class Quantity(BaseModel): - __root__: str diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py b/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py +++ b/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/v1.py b/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/v1.py index be4f29bd8..34970704b 100644 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/v1.py +++ b/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/v1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -77,10 +77,7 @@ class ListMeta(BaseModel): Field( alias="selfLink", description=( - "selfLink is a URL representing this object. Populated by the system." - " Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field" - " in 1.20 release and the field is planned to be removed in 1.21" - " release." + "Deprecated: selfLink is a legacy read-only field that is no longer" " populated by the system." ), ), ] = None @@ -101,7 +98,8 @@ class CreateOptions(BaseModel): "When present, indicates that modifications should not be\npersisted." " An invalid or unrecognized dryRun directive will\nresult in an error" " response and no further processing of the\nrequest. Valid values" - " are:\n- All: all dry run stages will be processed\n+optional" + " are:\n- All: all dry run stages will be" + " processed\n+optional\n+listType=atomic" ), ), ] = None @@ -123,32 +121,25 @@ class CreateOptions(BaseModel): alias="fieldValidation", title=( "fieldValidation instructs the server on how to handle\nobjects in the" - " request (POST/PUT/PATCH) containing unknown\nor duplicate fields," - " provided that the `ServerSideFieldValidation`\nfeature gate is also" - " enabled. Valid values are:\n- Ignore: This will ignore any unknown" - " fields that are silently\ndropped from the object, and will ignore" - " all but the last duplicate\nfield that the decoder encounters. This" - " is the default behavior\nprior to v1.23 and is the default behavior" - " when the\n`ServerSideFieldValidation` feature gate is disabled.\n-" - " Warn: This will send a warning via the standard warning" - " response\nheader for each unknown field that is dropped from the" - " object, and\nfor each duplicate field that is encountered. The" - " request will\nstill succeed if there are no other errors, and will" - " only persist\nthe last of any duplicate fields. This is the default" - " when the\n`ServerSideFieldValidation` feature gate is enabled.\n-" - " Strict: This will fail the request with a BadRequest error if\nany" - " unknown fields would be dropped from the object, or if any\nduplicate" - " fields are present. The error returned from the server\nwill contain" - " all unknown and duplicate fields encountered.\n+optional" + " request (POST/PUT/PATCH) containing unknown\nor duplicate fields." + " Valid values are:\n- Ignore: This will ignore any unknown fields that" + " are silently\ndropped from the object, and will ignore all but the" + " last duplicate\nfield that the decoder encounters. This is the" + " default behavior\nprior to v1.23.\n- Warn: This will send a warning" + " via the standard warning response\nheader for each unknown field that" + " is dropped from the object, and\nfor each duplicate field that is" + " encountered. The request will\nstill succeed if there are no other" + " errors, and will only persist\nthe last of any duplicate fields. This" + " is the default in v1.23+\n- Strict: This will fail the request with a" + " BadRequest error if\nany unknown fields would be dropped from the" + " object, or if any\nduplicate fields are present. The error returned" + " from the server\nwill contain all unknown and duplicate fields" + " encountered.\n+optional" ), ), ] = None -class Duration(BaseModel): - duration: Optional[str] = None - - class OwnerReference(BaseModel): api_version: Annotated[str, Field(alias="apiVersion", description="API version of the referent.")] block_owner_deletion: Annotated[ @@ -158,7 +149,10 @@ class OwnerReference(BaseModel): description=( 'If true, AND if the owner has the "foregroundDeletion" finalizer, then' " the owner cannot be deleted from the key-value store until this" - " reference is removed. Defaults to false. To set this field, a user" + " reference is removed. See" + " https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion" + " for how the garbage collector interacts with this field and enforces" + " the foreground deletion. Defaults to false. To set this field, a user" ' needs "delete" permission of the owner, otherwise 422 (Unprocessable' " Entity) will be returned." ), @@ -180,13 +174,19 @@ class OwnerReference(BaseModel): name: Annotated[ str, Field( - description=("Name of the referent. More info:" " http://kubernetes.io/docs/user-guide/identifiers#names") + description=( + "Name of the referent. More info:" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" + ) ), ] uid: Annotated[ str, Field( - description=("UID of the referent. More info:" " http://kubernetes.io/docs/user-guide/identifiers#uids") + description=( + "UID of the referent. More info:" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + ) ), ] @@ -226,41 +226,6 @@ class LabelSelectorRequirement(BaseModel): ] = None -class StatusCause(BaseModel): - field: Annotated[ - Optional[str], - Field( - description=( - "The field of the resource that has caused this error, as named by its" - " JSON serialization. May include dot and postfix notation for nested" - " attributes. Arrays are zero-indexed. Fields may appear more than" - " once in an array of causes due to fields having multiple errors." - ' Optional.\n\nExamples:\n "name" - the field "name" on the current' - ' resource\n "items[0].name" - the field "name" on the first array' - ' entry in "items"' - ) - ), - ] = None - message: Annotated[ - Optional[str], - Field( - description=( - "A human-readable description of the cause of the error. This field" - " may be presented as-is to a reader." - ) - ), - ] = None - reason: Annotated[ - Optional[str], - Field( - description=( - "A machine-readable description of the cause of the error. If this" - " value is empty there is no information available." - ) - ), - ] = None - - class ManagedFieldsEntry(BaseModel): api_version: Annotated[ Optional[str], @@ -323,7 +288,11 @@ class ManagedFieldsEntry(BaseModel): Optional[Time], Field( description=( - "Time is timestamp of when these fields were set. It should always be" " empty if Operation is 'Apply'" + "Time is the timestamp of when the ManagedFields entry was added. The" + " timestamp will also be updated if a field is added, the manager" + " changes any of the owned fields value or removes a field. The" + " timestamp does not update when a field is removed from the entry" + " because another manager took it over." ) ), ] = None @@ -360,22 +329,10 @@ class ObjectMeta(BaseModel): " that may be set by external tools to store and retrieve arbitrary" " metadata. They are not queryable and should be preserved when" " modifying objects. More info:" - " http://kubernetes.io/docs/user-guide/annotations" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations" ) ), ] = None - cluster_name: Annotated[ - Optional[str], - Field( - alias="clusterName", - description=( - "The name of the cluster which the object belongs to. This is used to" - " distinguish resources with same name and namespace in different" - " clusters. This field is not set anywhere right now and apiserver is" - " going to ignore it if set in create or update request." - ), - ), - ] = None creation_timestamp: Annotated[ Optional[Time], Field( @@ -464,12 +421,8 @@ class ObjectMeta(BaseModel): " suffix. The provided value has the same validation rules as the Name" " field, and may be truncated by the length of the suffix required to" " make the value unique on the server.\n\nIf this field is specified" - " and the generated name exists, the server will NOT return a 409 -" - " instead, it will either return 201 Created or 500 with Reason" - " ServerTimeout indicating a unique name could not be found in the time" - " allotted, and the client should retry (optionally after the time" - " indicated in the Retry-After header).\n\nApplied only if Name is not" - " specified. More info:" + " and the generated name exists, the server will return a" + " 409.\n\nApplied only if Name is not specified. More info:" " https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" ), ), @@ -490,7 +443,7 @@ class ObjectMeta(BaseModel): "Map of string keys and values that can be used to organize and" " categorize (scope and select) objects. May match selectors of" " replication controllers and services. More info:" - " http://kubernetes.io/docs/user-guide/labels" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/labels" ) ), ] = None @@ -518,7 +471,7 @@ class ObjectMeta(BaseModel): " generation of an appropriate name automatically. Name is primarily" " intended for creation idempotence and configuration definition." " Cannot be updated. More info:" - " http://kubernetes.io/docs/user-guide/identifiers#names" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" ) ), ] = None @@ -531,7 +484,8 @@ class ObjectMeta(BaseModel): ' "default" is the canonical representation. Not all objects are' " required to be scoped to a namespace - the value of this field for" " those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be" - " updated. More info: http://kubernetes.io/docs/user-guide/namespaces" + " updated. More info:" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces" ) ), ] = None @@ -570,10 +524,7 @@ class ObjectMeta(BaseModel): Field( alias="selfLink", description=( - "SelfLink is a URL representing this object. Populated by the system." - " Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field" - " in 1.20 release and the field is planned to be removed in 1.21" - " release." + "Deprecated: selfLink is a legacy read-only field that is no longer" " populated by the system." ), ), ] = None @@ -585,7 +536,7 @@ class ObjectMeta(BaseModel): " typically generated by the server on successful creation of a" " resource and is not allowed to change on PUT operations.\n\nPopulated" " by the system. Read-only. More info:" - " http://kubernetes.io/docs/user-guide/identifiers#uids" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" ) ), ] = None diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/v1.pyi b/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/v1.pyi deleted file mode 100644 index 17085cef1..000000000 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/apis/meta/v1.pyi +++ /dev/null @@ -1,80 +0,0 @@ -from datetime import datetime -from typing import Dict, List, Optional - -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -class CreateOptions(BaseModel): - dry_run: Optional[List[str]] - field_manager: Optional[str] - field_validation: Optional[str] - -class FieldsV1(BaseModel): ... - -class GroupVersionResource(BaseModel): - group: Optional[str] - resource: Optional[str] - version: Optional[str] - -class LabelSelectorRequirement(BaseModel): - key: str - operator: str - values: Optional[List[str]] - -class ListMeta(BaseModel): - continue_: Optional[str] - remaining_item_count: Optional[int] - resource_version: Optional[str] - self_link: Optional[str] - -class MicroTime(BaseModel): - __root__: datetime - -class OwnerReference(BaseModel): - api_version: str - block_owner_deletion: Optional[bool] - controller: Optional[bool] - kind: str - name: str - uid: str - -class StatusCause(BaseModel): - field: Optional[str] - message: Optional[str] - reason: Optional[str] - -class Time(BaseModel): - __root__: datetime - -class LabelSelector(BaseModel): - match_expressions: Optional[List[LabelSelectorRequirement]] - match_labels: Optional[Dict[str, str]] - -class ManagedFieldsEntry(BaseModel): - api_version: Optional[str] - fields_type: Optional[str] - fields_v1: Optional[FieldsV1] - manager: Optional[str] - operation: Optional[str] - subresource: Optional[str] - time: Optional[Time] - -class ObjectMeta(BaseModel): - annotations: Optional[Dict[str, str]] - cluster_name: Optional[str] - creation_timestamp: Optional[Time] - deletion_grace_period_seconds: Optional[int] - deletion_timestamp: Optional[Time] - finalizers: Optional[List[str]] - generate_name: Optional[str] - generation: Optional[int] - labels: Optional[Dict[str, str]] - managed_fields: Optional[List[ManagedFieldsEntry]] - name: Optional[str] - namespace: Optional[str] - owner_references: Optional[List[OwnerReference]] - resource_version: Optional[str] - self_link: Optional[str] - uid: Optional[str] diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/util/__init__.py b/src/hera/events/models/io/k8s/apimachinery/pkg/util/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/util/__init__.py +++ b/src/hera/events/models/io/k8s/apimachinery/pkg/util/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/util/intstr.py b/src/hera/events/models/io/k8s/apimachinery/pkg/util/intstr.py index 491566647..14b3f26cc 100644 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/util/intstr.py +++ b/src/hera/events/models/io/k8s/apimachinery/pkg/util/intstr.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/events/models/io/k8s/apimachinery/pkg/util/intstr.pyi b/src/hera/events/models/io/k8s/apimachinery/pkg/util/intstr.pyi deleted file mode 100644 index 1db9eb8d6..000000000 --- a/src/hera/events/models/io/k8s/apimachinery/pkg/util/intstr.pyi +++ /dev/null @@ -1,6 +0,0 @@ -from typing import Union - -from hera.shared._pydantic import BaseModel as BaseModel - -class IntOrString(BaseModel): - __root__: Union[str, int] diff --git a/src/hera/events/models/sensor.py b/src/hera/events/models/sensor.py index 35f4ed6cc..8c619de1f 100644 --- a/src/hera/events/models/sensor.py +++ b/src/hera/events/models/sensor.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/events/models/sensor.pyi b/src/hera/events/models/sensor.pyi deleted file mode 100644 index 88ebbf238..000000000 --- a/src/hera/events/models/sensor.pyi +++ /dev/null @@ -1,35 +0,0 @@ -from typing import Optional - -from hera.shared._pydantic import ( - BaseModel as BaseModel, - Field as Field, -) - -from .io.argoproj.events import v1alpha1 as v1alpha1 -from .io.k8s.apimachinery.pkg.apis.meta import v1 as v1 - -class DeleteSensorResponse(BaseModel): ... - -class LogEntry(BaseModel): - dependency_name: Optional[str] - event_context: Optional[str] - level: Optional[str] - msg: Optional[str] - namespace: Optional[str] - sensor_name: Optional[str] - time: Optional[v1.Time] - trigger_name: Optional[str] - -class CreateSensorRequest(BaseModel): - create_options: Optional[v1.CreateOptions] - namespace: Optional[str] - sensor: Optional[v1alpha1.Sensor] - -class SensorWatchEvent(BaseModel): - object: Optional[v1alpha1.Sensor] - type: Optional[str] - -class UpdateSensorRequest(BaseModel): - name: Optional[str] - namespace: Optional[str] - sensor: Optional[v1alpha1.Sensor] diff --git a/src/hera/events/service.py b/src/hera/events/service.py index 7cab76d46..973442317 100644 --- a/src/hera/events/service.py +++ b/src/hera/events/service.py @@ -106,6 +106,7 @@ def list_event_sources( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> EventSourceList: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -124,6 +125,7 @@ def list_event_sources( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, @@ -285,6 +287,7 @@ def list_sensors( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> SensorList: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -303,6 +306,7 @@ def list_sensors( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, @@ -424,6 +428,7 @@ def watch_event_sources( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> EventSourceWatchEvent: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -442,6 +447,7 @@ def watch_event_sources( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, @@ -518,6 +524,7 @@ def watch_events( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> Event: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -536,6 +543,7 @@ def watch_events( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, @@ -560,6 +568,7 @@ def watch_sensors( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> SensorWatchEvent: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -578,6 +587,7 @@ def watch_sensors( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, diff --git a/src/hera/workflows/_mixins.py b/src/hera/workflows/_mixins.py index ee9dfc29c..a89051c00 100644 --- a/src/hera/workflows/_mixins.py +++ b/src/hera/workflows/_mixins.py @@ -32,6 +32,7 @@ Artifact as ModelArtifact, ArtifactLocation, ContainerPort, + ContainerResizePolicy, ContinueOn, EnvFromSource, EnvVar, @@ -58,7 +59,6 @@ Synchronization, Template, TemplateRef, - TerminationMessagePolicy, Toleration, UserContainer as ModelUserContainer, Volume as ModelVolume, @@ -185,7 +185,7 @@ class ContainerMixin(BaseMixin): stdin: Optional[bool] = None stdin_once: Optional[bool] = None termination_message_path: Optional[str] = None - termination_message_policy: Optional[TerminationMessagePolicy] = None + termination_message_policy: Optional[str] = None tty: Optional[bool] = None def _build_image_pull_policy(self) -> Optional[str]: @@ -484,6 +484,8 @@ class ResourceMixin(BaseMixin): """`ResourceMixin` provides the capability to set resources such as compute requirements like CPU, GPU, etc.""" resources: Optional[Union[ResourceRequirements, Resources]] = None + resize_policy: Optional[List[ContainerResizePolicy]] = None + restart_policy: Optional[str] = None def _build_resources(self) -> Optional[ResourceRequirements]: """Parses the resources and returns a generated `ResourceRequirements` object.""" diff --git a/src/hera/workflows/container.py b/src/hera/workflows/container.py index acc1ce404..30a8dd333 100644 --- a/src/hera/workflows/container.py +++ b/src/hera/workflows/container.py @@ -59,7 +59,9 @@ def _build_container(self) -> _ModelContainer: liveness_probe=self.liveness_probe, ports=self.ports, readiness_probe=self.readiness_probe, + resize_policy=self.resize_policy, resources=self._build_resources(), + restart_policy=self.restart_policy, security_context=self.security_context, startup_probe=self.startup_probe, stdin=self.stdin, diff --git a/src/hera/workflows/container_set.py b/src/hera/workflows/container_set.py index 06ae610a4..267225e13 100644 --- a/src/hera/workflows/container_set.py +++ b/src/hera/workflows/container_set.py @@ -113,15 +113,15 @@ def _build_container_node(self) -> _ModelContainerNode: name=self.name, ports=self.ports, readiness_probe=self.readiness_probe, + resize_policy=self.resize_policy, resources=self._build_resources(), + restart_policy=self.restart_policy, security_context=self.security_context, startup_probe=self.startup_probe, stdin=self.stdin, stdin_once=self.stdin_once, termination_message_path=self.termination_message_path, - termination_message_policy=self.termination_message_policy.value - if self.termination_message_policy - else None, + termination_message_policy=self.termination_message_policy, tty=self.tty, volume_devices=self.volume_devices, volume_mounts=self._build_volume_mounts(), diff --git a/src/hera/workflows/cron_workflow.py b/src/hera/workflows/cron_workflow.py index 4c189c500..0d4f05e7e 100644 --- a/src/hera/workflows/cron_workflow.py +++ b/src/hera/workflows/cron_workflow.py @@ -5,7 +5,7 @@ """ from pathlib import Path -from typing import Annotated, Dict, Optional, Type, Union, cast +from typing import Annotated, Dict, List, Optional, Type, Union, cast from hera.exceptions import NotFound from hera.shared._pydantic import BaseModel @@ -21,6 +21,7 @@ CronWorkflowSpec, CronWorkflowStatus, LintCronWorkflowRequest, + StopStrategy, UpdateCronWorkflowRequest, Workflow as _ModelWorkflow, ) @@ -76,15 +77,18 @@ class CronWorkflow(Workflow): failed_jobs_history_limit: Annotated[Optional[int], _CronWorkflowModelMapper("spec.failed_jobs_history_limit")] = ( None ) - schedule: Annotated[str, _CronWorkflowModelMapper("spec.schedule")] + schedule: Annotated[Optional[str], _CronWorkflowModelMapper("spec.schedule")] = None + schedules: Annotated[Optional[List[str]], _CronWorkflowModelMapper("spec.schedules")] = None starting_deadline_seconds: Annotated[Optional[int], _CronWorkflowModelMapper("spec.starting_deadline_seconds")] = ( None ) + stop_strategy: Annotated[Optional[StopStrategy], _CronWorkflowModelMapper("spec.stop_strategy")] = None successful_jobs_history_limit: Annotated[ Optional[int], _CronWorkflowModelMapper("spec.successful_jobs_history_limit") ] = None cron_suspend: Annotated[Optional[bool], _CronWorkflowModelMapper("spec.suspend")] = None timezone: Annotated[Optional[str], _CronWorkflowModelMapper("spec.timezone")] = None + when: Annotated[Optional[str], _CronWorkflowModelMapper("spec.when")] = None cron_status: Annotated[Optional[CronWorkflowStatus], _CronWorkflowModelMapper("status")] = None def create(self) -> TWorkflow: # type: ignore @@ -149,7 +153,6 @@ def build(self) -> TWorkflow: model_cron_workflow = _ModelCronWorkflow( metadata=model_workflow.metadata, spec=CronWorkflowSpec( - schedule=self.schedule, workflow_spec=model_workflow.spec, ), ) @@ -160,7 +163,7 @@ def build(self) -> TWorkflow: def _from_model(cls, model: BaseModel) -> ModelMapperMixin: """Parse from given model to cls's type.""" assert isinstance(model, _ModelCronWorkflow) - hera_cron_workflow = cls(schedule="") + hera_cron_workflow = cls() for attr, annotation in cls._get_all_annotations().items(): if mappers := get_annotated_metadata(annotation, ModelMapperMixin.ModelMapper): diff --git a/src/hera/workflows/models/__init__.py b/src/hera/workflows/models/__init__.py index 1674ddd97..5ac78215f 100644 --- a/src/hera/workflows/models/__init__.py +++ b/src/hera/workflows/models/__init__.py @@ -1,7 +1,7 @@ """[DO NOT EDIT MANUALLY] Auto-generated model classes. Auto-generated by Hera via `make workflows-models`. -OpenAPI spec URL: https://raw.githubusercontent.com/argoproj/argo-workflows/v3.5.5/api/openapi-spec/swagger.json +OpenAPI spec URL: https://raw.githubusercontent.com/argoproj/argo-workflows/v3.6.2/api/openapi-spec/swagger.json """ from hera.workflows.models.google.protobuf import Any @@ -15,18 +15,13 @@ ArtGCStatus, Artifact, ArtifactGC, - ArtifactGCSpec, - ArtifactGCStatus, ArtifactLocation, - ArtifactNodeSpec, ArtifactoryArtifact, ArtifactoryArtifactRepository, ArtifactPaths, ArtifactRepository, ArtifactRepositoryRef, ArtifactRepositoryRefStatus, - ArtifactResult, - ArtifactResultNodeStatus, AzureArtifact, AzureArtifactRepository, Backoff, @@ -98,7 +93,6 @@ MutexHolding, MutexStatus, NodeFlag, - NodeResult, NodeStatus, NodeSynchronizationStatus, NoneStrategy, @@ -128,6 +122,7 @@ SemaphoreRef, SemaphoreStatus, Sequence, + StopStrategy, Submit, SubmitOpts, SuppliedValueFrom, @@ -164,8 +159,6 @@ WorkflowStopRequest, WorkflowSubmitRequest, WorkflowSuspendRequest, - WorkflowTaskSetSpec, - WorkflowTaskSetStatus, WorkflowTemplate, WorkflowTemplateCreateRequest, WorkflowTemplateDeleteResponse, @@ -179,23 +172,25 @@ ) from hera.workflows.models.io.k8s.api.core.v1 import ( Affinity, + AppArmorProfile, AWSElasticBlockStoreVolumeSource, AzureDiskVolumeSource, AzureFileVolumeSource, Capabilities, CephFSVolumeSource, CinderVolumeSource, + ClusterTrustBundleProjection, ConfigMapEnvSource, ConfigMapKeySelector, ConfigMapProjection, ConfigMapVolumeSource, Container, ContainerPort, + ContainerResizePolicy, CSIVolumeSource, DownwardAPIProjection, DownwardAPIVolumeFile, DownwardAPIVolumeSource, - Effect, EmptyDirVolumeSource, EnvFromSource, EnvVar, @@ -219,6 +214,7 @@ Lifecycle, LifecycleHandler, LocalObjectReference, + ModifyVolumeStatus, NFSVolumeSource, NodeAffinity, NodeSelector, @@ -226,15 +222,12 @@ NodeSelectorTerm, ObjectFieldSelector, ObjectReference, - Operator, - OperatorModel, PersistentVolumeClaim, PersistentVolumeClaimCondition, PersistentVolumeClaimSpec, PersistentVolumeClaimStatus, PersistentVolumeClaimTemplate, PersistentVolumeClaimVolumeSource, - Phase, PhotonPersistentDiskVolumeSource, PodAffinity, PodAffinityTerm, @@ -246,13 +239,12 @@ PreferredSchedulingTerm, Probe, ProjectedVolumeSource, - Protocol, QuobyteVolumeSource, RBDVolumeSource, + ResourceClaim, ResourceFieldSelector, ResourceRequirements, ScaleIOVolumeSource, - Scheme, SeccompProfile, SecretEnvSource, SecretKeySelector, @@ -262,18 +254,18 @@ SELinuxOptions, ServiceAccountTokenProjection, ServicePort, + SleepAction, StorageOSVolumeSource, Sysctl, TCPSocketAction, - TerminationMessagePolicy, Toleration, - Type, TypedLocalObjectReference, - TypeModel, + TypedObjectReference, Volume, VolumeDevice, VolumeMount, VolumeProjection, + VolumeResourceRequirements, VsphereVirtualDiskVolumeSource, WeightedPodAffinityTerm, WindowsSecurityContextOptions, @@ -282,7 +274,6 @@ from hera.workflows.models.io.k8s.apimachinery.pkg.api.resource import Quantity from hera.workflows.models.io.k8s.apimachinery.pkg.apis.meta.v1 import ( CreateOptions, - Duration, FieldsV1, GroupVersionResource, LabelSelector, @@ -292,7 +283,6 @@ MicroTime, ObjectMeta, OwnerReference, - StatusCause, Time, ) from hera.workflows.models.io.k8s.apimachinery.pkg.util.intstr import IntOrString @@ -302,22 +292,18 @@ "Affinity", "Amount", "Any", + "AppArmorProfile", "ArchiveStrategy", "ArchivedWorkflowDeletedResponse", "Arguments", "ArtGCStatus", "Artifact", "ArtifactGC", - "ArtifactGCSpec", - "ArtifactGCStatus", "ArtifactLocation", - "ArtifactNodeSpec", "ArtifactPaths", "ArtifactRepository", "ArtifactRepositoryRef", "ArtifactRepositoryRefStatus", - "ArtifactResult", - "ArtifactResultNodeStatus", "ArtifactoryArtifact", "ArtifactoryArtifactRepository", "AzureArtifact", @@ -332,6 +318,7 @@ "CephFSVolumeSource", "CinderVolumeSource", "ClientCertAuth", + "ClusterTrustBundleProjection", "ClusterWorkflowTemplate", "ClusterWorkflowTemplateCreateRequest", "ClusterWorkflowTemplateDeleteResponse", @@ -349,6 +336,7 @@ "Container", "ContainerNode", "ContainerPort", + "ContainerResizePolicy", "ContainerSetRetryStrategy", "ContainerSetTemplate", "ContinueOn", @@ -370,8 +358,6 @@ "DownwardAPIProjection", "DownwardAPIVolumeFile", "DownwardAPIVolumeSource", - "Duration", - "Effect", "EmptyDirVolumeSource", "EnvFromSource", "EnvVar", @@ -435,13 +421,13 @@ "MetricLabel", "Metrics", "MicroTime", + "ModifyVolumeStatus", "Mutex", "MutexHolding", "MutexStatus", "NFSVolumeSource", "NodeAffinity", "NodeFlag", - "NodeResult", "NodeSelector", "NodeSelectorRequirement", "NodeSelectorTerm", @@ -456,8 +442,6 @@ "ObjectFieldSelector", "ObjectMeta", "ObjectReference", - "Operator", - "OperatorModel", "Outputs", "OwnerReference", "ParallelSteps", @@ -468,7 +452,6 @@ "PersistentVolumeClaimStatus", "PersistentVolumeClaimTemplate", "PersistentVolumeClaimVolumeSource", - "Phase", "PhotonPersistentDiskVolumeSource", "Plugin", "PodAffinity", @@ -484,11 +467,11 @@ "Probe", "ProjectedVolumeSource", "Prometheus", - "Protocol", "Quantity", "QuobyteVolumeSource", "RBDVolumeSource", "RawArtifact", + "ResourceClaim", "ResourceFieldSelector", "ResourceRequirements", "ResourceTemplate", @@ -502,7 +485,6 @@ "S3EncryptionOptions", "SELinuxOptions", "ScaleIOVolumeSource", - "Scheme", "ScriptTemplate", "SeccompProfile", "SecretEnvSource", @@ -516,7 +498,8 @@ "Sequence", "ServiceAccountTokenProjection", "ServicePort", - "StatusCause", + "SleepAction", + "StopStrategy", "StorageOSVolumeSource", "StreamError", "Submit", @@ -531,13 +514,11 @@ "TarStrategy", "Template", "TemplateRef", - "TerminationMessagePolicy", "Time", "Toleration", "TransformationStep", - "Type", - "TypeModel", "TypedLocalObjectReference", + "TypedObjectReference", "UpdateCronWorkflowRequest", "UserContainer", "V1HTTPHeader", @@ -550,6 +531,7 @@ "VolumeDevice", "VolumeMount", "VolumeProjection", + "VolumeResourceRequirements", "VsphereVirtualDiskVolumeSource", "WeightedPodAffinityTerm", "WindowsSecurityContextOptions", @@ -573,8 +555,6 @@ "WorkflowStopRequest", "WorkflowSubmitRequest", "WorkflowSuspendRequest", - "WorkflowTaskSetSpec", - "WorkflowTaskSetStatus", "WorkflowTemplate", "WorkflowTemplateCreateRequest", "WorkflowTemplateDeleteResponse", diff --git a/src/hera/workflows/models/eventsource.py b/src/hera/workflows/models/eventsource.py index 1f042a692..715a95aee 100644 --- a/src/hera/workflows/models/eventsource.py +++ b/src/hera/workflows/models/eventsource.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/workflows/models/google/__init__.py b/src/hera/workflows/models/google/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/google/__init__.py +++ b/src/hera/workflows/models/google/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/google/protobuf.py b/src/hera/workflows/models/google/protobuf.py index fac67c8d0..0911c21ba 100644 --- a/src/hera/workflows/models/google/protobuf.py +++ b/src/hera/workflows/models/google/protobuf.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/workflows/models/grpc/gateway/__init__.py b/src/hera/workflows/models/grpc/gateway/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/grpc/gateway/__init__.py +++ b/src/hera/workflows/models/grpc/gateway/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/grpc/gateway/runtime.py b/src/hera/workflows/models/grpc/gateway/runtime.py index 4a8a624de..f337b5ae6 100644 --- a/src/hera/workflows/models/grpc/gateway/runtime.py +++ b/src/hera/workflows/models/grpc/gateway/runtime.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/workflows/models/io/argoproj/events/__init__.py b/src/hera/workflows/models/io/argoproj/events/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/io/argoproj/events/__init__.py +++ b/src/hera/workflows/models/io/argoproj/events/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/io/argoproj/events/v1alpha1.py b/src/hera/workflows/models/io/argoproj/events/v1alpha1.py index 5c52258e7..fbcde679e 100644 --- a/src/hera/workflows/models/io/argoproj/events/v1alpha1.py +++ b/src/hera/workflows/models/io/argoproj/events/v1alpha1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -435,7 +435,7 @@ class Selector(BaseModel): Optional[str], Field( title=( - "Supported operations like ==, !=, <=, >= etc.\nDefaults to ==.\nRefer" + "Supported operations like ==, != etc.\nDefaults to ==.\nRefer" " https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" " for more io.argoproj.workflow.v1alpha1.\n+optional" ) @@ -444,6 +444,42 @@ class Selector(BaseModel): value: Annotated[Optional[str], Field(title="Value")] = None +class SlackSender(BaseModel): + icon: Annotated[ + Optional[str], + Field( + title=( + "Icon is the Slack application's icon, e.g. :robot_face: or" + " https://example.com/image.png\n+optional" + ) + ), + ] = None + username: Annotated[ + Optional[str], + Field(title="Username is the Slack application's username\n+optional"), + ] = None + + +class SlackThread(BaseModel): + broadcast_message_to_channel: Annotated[ + Optional[bool], + Field( + alias="broadcastMessageToChannel", + title=( + "BroadcastMessageToChannel allows to also broadcast the message from" + " the thread to the channel\n+optional" + ), + ), + ] = None + message_aggregation_key: Annotated[ + Optional[str], + Field( + alias="messageAggregationKey", + title=("MessageAggregationKey allows to aggregate the messages to a thread by" " some key.\n+optional"), + ), + ] = None + + class StatusPolicy(BaseModel): allow: Optional[List[int]] = None @@ -525,6 +561,21 @@ class TriggerParameterSource(BaseModel): ), ), ] = None + use_raw_data: Annotated[ + Optional[bool], + Field( + alias="useRawData", + title=( + "UseRawData indicates if the value in an event at data key should be" + " used without converting to string.\nWhen true, a number, boolean," + " json or string parameter may be extracted. When the field is" + " unspecified, or explicitly\nfalse, the behavior is to turn the" + " extracted field into a string. (e.g. when set to true, the" + " parameter\n123 will resolve to the numerical type, but when false, or" + ' not provided, the string "123" will be resolved)\n+optional' + ), + ), + ] = None value: Annotated[ Optional[str], Field( @@ -641,7 +692,11 @@ class ResourceFilter(BaseModel): title=( "Labels provide listing options to K8s API to watch resource/s.\nRefer" " https://kubernetes.io/docs/concepts/overview/working-with-objects/label-selectors/" - " for more io.argoproj.workflow.v1alpha1.\n+optional" + " for more io.argoproj.workflow.v1alpha1.\nUnlike K8s field selector," + " multiple values are passed as comma separated values instead of list" + " of values.\nEg: value: value1,value2.\nSame as K8s label selector," + ' operator "=", "==", "!=", "exists", "!", "notin", "in", "gt" and' + ' "lt"\nare supported\n+optional' ) ), ] = None @@ -685,6 +740,85 @@ class AzureEventsHubEventSource(BaseModel): ] = None +class AzureQueueStorageEventSource(BaseModel): + connection_string: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="connectionString", + title=( + "ConnectionString is the connection string to access Azure Queue" + " Storage. If this fields is not provided\nit will try to access via" + " Azure AD with StorageAccountName.\n+optional" + ), + ), + ] = None + decode_message: Annotated[ + Optional[bool], + Field( + alias="decodeMessage", + title=( + "DecodeMessage specifies if all the messages should be base64" + " decoded.\nIf set to true the decoding is done before the evaluation" + " of JSONBody\n+optional" + ), + ), + ] = None + dlq: Annotated[ + Optional[bool], + Field( + title=( + "DLQ specifies if a dead-letter queue is configured for messages that" + " can't be processed successfully.\nIf set to true, messages with" + " invalid payload won't be acknowledged to allow to forward them" + " farther to the dead-letter queue.\nThe default value is" + " false.\n+optional" + ) + ), + ] = None + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + json_body: Annotated[ + Optional[bool], + Field( + alias="jsonBody", + title=( + "JSONBody specifies that all event body payload coming from" " this\nsource will be JSON\n+optional" + ), + ), + ] = None + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + queue_name: Annotated[ + Optional[str], + Field(alias="queueName", title="QueueName is the name of the queue"), + ] = None + storage_account_name: Annotated[ + Optional[str], + Field( + alias="storageAccountName", + title=( + "StorageAccountName is the name of the storage account where the queue" + " is. This field is necessary to\naccess via Azure AD (managed" + " identity) and it is ignored if ConnectionString is set.\n+optional" + ), + ), + ] = None + wait_time_in_seconds: Annotated[ + Optional[int], + Field( + alias="waitTimeInSeconds", + title=( + "WaitTimeInSeconds is the duration (in seconds) for which the event" + " source waits between empty results from the queue.\nThe default value" + " is 3 seconds.\n+optional" + ), + ), + ] = None + + class BasicAuth(BaseModel): password: Annotated[ Optional[v1_1.SecretKeySelector], @@ -871,17 +1005,18 @@ class SASLConfig(BaseModel): ) ), ] = None - password: Annotated[ + password_secret: Annotated[ Optional[v1_1.SecretKeySelector], - Field(title="Password for SASL/PLAIN authentication"), + Field(alias="passwordSecret", title="Password for SASL/PLAIN authentication"), ] = None - user: Annotated[ + user_secret: Annotated[ Optional[v1_1.SecretKeySelector], Field( + alias="userSecret", title=( "User is the authentication identity (authcid) to present" " for\nSASL/PLAIN or SASL/SCRAM authentication" - ) + ), ), ] = None @@ -1229,9 +1364,64 @@ class HDFSEventSource(BaseModel): watch_path_config: Annotated[Optional[WatchPathConfig], Field(alias="watchPathConfig")] = None +class SFTPEventSource(BaseModel): + address: Annotated[Optional[v1_1.SecretKeySelector], Field(description="Address sftp address.")] = None + event_type: Annotated[ + Optional[str], + Field( + alias="eventType", + title=( + "Type of file operations to watch\nRefer" + " https://github.com/fsnotify/fsnotify/blob/master/fsnotify.go for more" + " information" + ), + ), + ] = None + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + password: Annotated[ + Optional[v1_1.SecretKeySelector], + Field(description="Password required for authentication if any."), + ] = None + poll_interval_duration: Annotated[ + Optional[str], + Field( + alias="pollIntervalDuration", + title=( + "PollIntervalDuration the interval at which to poll the SFTP" + " server\ndefaults to 10 seconds\n+optional" + ), + ), + ] = None + ssh_key_secret: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="sshKeySecret", + title="SSHKeySecret refers to the secret that contains SSH key", + ), + ] = None + username: Annotated[ + Optional[v1_1.SecretKeySelector], + Field(description="Username required for authentication if any."), + ] = None + watch_path_config: Annotated[ + Optional[WatchPathConfig], + Field( + alias="watchPathConfig", + title="WatchPathConfig contains configuration about the file path to watch", + ), + ] = None + + class S3Artifact(BaseModel): access_key: Annotated[Optional[v1_1.SecretKeySelector], Field(alias="accessKey")] = None bucket: Optional[S3Bucket] = None + ca_certificate: Annotated[Optional[v1_1.SecretKeySelector], Field(alias="caCertificate")] = None endpoint: Optional[str] = None events: Optional[List[str]] = None filter: Optional[S3Filter] = None @@ -1318,6 +1508,15 @@ class NATSAuth(BaseModel): ] = None +class SchemaRegistryConfig(BaseModel): + auth: Annotated[ + Optional[BasicAuth], + Field(title="+optional\nSchemaRegistry - basic authentication"), + ] = None + schema_id: Annotated[Optional[int], Field(alias="schemaId", title="Schema ID")] = None + url: Annotated[Optional[str], Field(description="Schema Registry URL.")] = None + + class BitbucketAuth(BaseModel): basic: Annotated[ Optional[BitbucketBasicAuth], @@ -1384,41 +1583,88 @@ class GitArtifact(BaseModel): url: Annotated[Optional[str], Field(title="Git URL")] = None -class KafkaTrigger(BaseModel): - compress: Annotated[ - Optional[bool], +class AzureServiceBusEventSource(BaseModel): + connection_string: Annotated[ + Optional[v1_1.SecretKeySelector], Field( + alias="connectionString", title=( - "Compress determines whether to compress message or not.\nDefaults to" - " false.\nIf set to true, compresses message using snappy" - " compression.\n+optional" - ) + "ConnectionString is the connection string for the Azure Service Bus." + " If this fields is not provided\nit will try to access via Azure AD" + " with DefaultAzureCredential and FullyQualifiedNamespace.\n+optional" + ), ), ] = None - flush_frequency: Annotated[ - Optional[int], + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + fully_qualified_namespace: Annotated[ + Optional[str], Field( - alias="flushFrequency", + alias="fullyQualifiedNamespace", title=( - "FlushFrequency refers to the frequency in milliseconds to flush" - " batches.\nDefaults to 500 milliseconds.\n+optional" + "FullyQualifiedNamespace is the Service Bus namespace name (ex:" + " myservicebus.servicebus.windows.net). This field is necessary" + " to\naccess via Azure AD (managed identity) and it is ignored if" + " ConnectionString is set.\n+optional" ), ), ] = None - parameters: Annotated[ - Optional[List[TriggerParameter]], + json_body: Annotated[ + Optional[bool], Field( - description=("Parameters is the list of parameters that is applied to resolved Kafka" " trigger object.") + alias="jsonBody", + title=( + "JSONBody specifies that all event body payload coming from" " this\nsource will be JSON\n+optional" + ), ), ] = None - partition: Annotated[Optional[int], Field(description="Partition to write data to.")] = None - partitioning_key: Annotated[ + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + queue_name: Annotated[ Optional[str], Field( - alias="partitioningKey", - description=( - "The partitioning key for the messages put on the Kafka" " topic.\nDefaults to broker url.\n+optional." - ), + alias="queueName", + title="QueueName is the name of the Azure Service Bus Queue", + ), + ] = None + subscription_name: Annotated[ + Optional[str], + Field( + alias="subscriptionName", + title=("SubscriptionName is the name of the Azure Service Bus Topic" " Subscription"), + ), + ] = None + tls: Annotated[ + Optional[TLSConfig], + Field(title="TLS configuration for the service bus client\n+optional"), + ] = None + topic_name: Annotated[ + Optional[str], + Field( + alias="topicName", + title="TopicName is the name of the Azure Service Bus Topic", + ), + ] = None + + +class AzureServiceBusTrigger(BaseModel): + connection_string: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="connectionString", + title="ConnectionString is the connection string for the Azure Service Bus", + ), + ] = None + parameters: Annotated[ + Optional[List[TriggerParameter]], + Field( + title=( + "Parameters is the list of key-value extracted from event's payload" + " that are applied to\nthe trigger resource.\n+optional" + ) ), ] = None payload: Annotated[ @@ -1429,40 +1675,29 @@ class KafkaTrigger(BaseModel): ) ), ] = None - required_acks: Annotated[ - Optional[int], + queue_name: Annotated[ + Optional[str], Field( - alias="requiredAcks", - description=( - "RequiredAcks used in producer to tell the broker how many replica" - " acknowledgements\nDefaults to 1 (Only wait for the leader to" - " ack).\n+optional." - ), + alias="queueName", + title="QueueName is the name of the Azure Service Bus Queue", ), ] = None - sasl: Annotated[ - Optional[SASLConfig], - Field(title="SASL configuration for the kafka client\n+optional"), + subscription_name: Annotated[ + Optional[str], + Field( + alias="subscriptionName", + title=("SubscriptionName is the name of the Azure Service Bus Topic" " Subscription"), + ), ] = None tls: Annotated[ Optional[TLSConfig], - Field(title="TLS configuration for the Kafka producer.\n+optional"), + Field(title="TLS configuration for the service bus client\n+optional"), ] = None - topic: Annotated[ - Optional[str], - Field(title=("Name of the topic.\nMore info at" " https://kafka.apache.org/documentation/#intro_topics")), - ] = None - url: Annotated[ - Optional[str], - Field(description="URL of the Kafka broker, multiple URLs separated by comma."), - ] = None - version: Annotated[ + topic_name: Annotated[ Optional[str], Field( - title=( - "Specify what kafka version is being connected to enables certain" - " features in sarama, defaults to 1.0.0\n+optional" - ) + alias="topicName", + title="TopicName is the name of the Azure Service Bus Topic", ), ] = None @@ -1663,6 +1898,10 @@ class BitbucketServerEventSource(BaseModel): ), ), ] = None + tls: Annotated[ + Optional[TLSConfig], + Field(title="TLS configuration for the bitbucketserver client.\n+optional"), + ] = None webhook: Annotated[ Optional[WebhookContext], Field(title="Webhook holds configuration to run a http server"), @@ -1679,6 +1918,62 @@ class BitbucketServerEventSource(BaseModel): ] = None +class GerritEventSource(BaseModel): + auth: Annotated[ + Optional[BasicAuth], + Field(title="Auth hosts secret selectors for username and password\n+optional"), + ] = None + delete_hook_on_finish: Annotated[ + Optional[bool], + Field( + alias="deleteHookOnFinish", + title=( + "DeleteHookOnFinish determines whether to delete the Gerrit hook for" + " the project once the event source is stopped.\n+optional" + ), + ), + ] = None + events: Annotated[ + Optional[List[str]], + Field( + title=( + "Events are gerrit event to listen to.\nRefer" + " https://gerrit-review.googlesource.com/Documentation/cmd-stream-events.html#events" + ) + ), + ] = None + filter: Annotated[Optional[EventSourceFilter], Field(title="Filter\n+optional")] = None + gerrit_base_url: Annotated[ + Optional[str], + Field( + alias="gerritBaseURL", + title="GerritBaseURL is the base URL for API requests to a custom endpoint", + ), + ] = None + hook_name: Annotated[ + Optional[str], + Field(alias="hookName", title="HookName is the name of the webhook"), + ] = None + metadata: Annotated[ + Optional[Dict[str, str]], + Field( + title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") + ), + ] = None + projects: Annotated[ + Optional[List[str]], + Field(description='List of project namespace paths like "whynowy/test".'), + ] = None + ssl_verify: Annotated[ + Optional[bool], + Field(alias="sslVerify", title="SslVerify to enable ssl verification\n+optional"), + ] = None + webhook: Annotated[ + Optional[WebhookContext], + Field(title="Webhook holds configuration to run a http server"), + ] = None + + class GithubEventSource(BaseModel): active: Annotated[ Optional[bool], @@ -1847,6 +2142,15 @@ class GitlabEventSource(BaseModel): title="GitlabBaseURL is the base URL for API requests to a custom endpoint", ), ] = None + groups: Annotated[ + Optional[List[str]], + Field( + title=( + 'List of group IDs or group name like "test".\nGroup level hook' + " available in Premium and Ultimate Gitlab.\n+optional" + ) + ), + ] = None metadata: Annotated[ Optional[Dict[str, str]], Field( @@ -1866,7 +2170,12 @@ class GitlabEventSource(BaseModel): ] = None projects: Annotated[ Optional[List[str]], - Field(title='List of project IDs or project namespace paths like "whynowy/test"'), + Field( + title=( + 'List of project IDs or project namespace paths like "whynowy/test".' + " Projects and groups cannot be empty at the same time.\n+optional" + ) + ), ] = None secret_token: Annotated[ Optional[v1_1.SecretKeySelector], @@ -2220,7 +2529,7 @@ class KafkaEventSource(BaseModel): description=( "Yaml format Sarama config for Kafka connection.\nIt follows the struct" " of sarama.Config. See" - " https://github.com/Shopify/sarama/blob/main/config.go\ne.g.\n\nconsumer:\n" + " https://github.com/IBM/sarama/blob/main/config.go\ne.g.\n\nconsumer:\n" " fetch:\n min: 1\nnet:\n MaxOpenRequests: 5\n\n+optional" ) ), @@ -2259,7 +2568,7 @@ class KafkaEventSource(BaseModel): title=("Metadata holds the user defined metadata which will passed along the" " event payload.\n+optional") ), ] = None - partition: Annotated[Optional[str], Field(title="Partition name")] = None + partition: Annotated[Optional[str], Field(title="Partition name\n+optional")] = None sasl: Annotated[ Optional[SASLConfig], Field(title="SASL configuration for the kafka client\n+optional"), @@ -2285,6 +2594,10 @@ class KafkaEventSource(BaseModel): class MQTTEventSource(BaseModel): + auth: Annotated[ + Optional[BasicAuth], + Field(title="Auth hosts secret selectors for username and password\n+optional"), + ] = None client_id: Annotated[Optional[str], Field(alias="clientId", title="ClientID is the id of the client")] = None connection_backoff: Annotated[ Optional[Backoff], @@ -2357,11 +2670,36 @@ class NSQEventSource(BaseModel): class PulsarEventSource(BaseModel): + auth_athenz_params: Annotated[ + Optional[Dict[str, str]], + Field( + alias="authAthenzParams", + title=( + "Authentication athenz parameters for the pulsar client.\nRefer" + " https://github.com/apache/pulsar-client-go/blob/master/pulsar/auth/athenz.go\nEither" + " token or athenz can be set to use auth.\n+optional" + ), + ), + ] = None + auth_athenz_secret: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="authAthenzSecret", + title=( + "Authentication athenz privateKey secret for the pulsar" + " client.\nAuthAthenzSecret must be set if AuthAthenzParams is" + " used.\n+optional" + ), + ), + ] = None auth_token_secret: Annotated[ Optional[v1_1.SecretKeySelector], Field( alias="authTokenSecret", - title="Authentication token for the pulsar client.\n+optional", + title=( + "Authentication token for the pulsar client.\nEither token or athenz" + " can be set to use auth.\n+optional" + ), ), ] = None connection_backoff: Annotated[ @@ -2432,11 +2770,36 @@ class PulsarEventSource(BaseModel): class PulsarTrigger(BaseModel): + auth_athenz_params: Annotated[ + Optional[Dict[str, str]], + Field( + alias="authAthenzParams", + title=( + "Authentication athenz parameters for the pulsar client.\nRefer" + " https://github.com/apache/pulsar-client-go/blob/master/pulsar/auth/athenz.go\nEither" + " token or athenz can be set to use auth.\n+optional" + ), + ), + ] = None + auth_athenz_secret: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="authAthenzSecret", + title=( + "Authentication athenz privateKey secret for the pulsar" + " client.\nAuthAthenzSecret must be set if AuthAthenzParams is" + " used.\n+optional" + ), + ), + ] = None auth_token_secret: Annotated[ Optional[v1_1.SecretKeySelector], Field( alias="authTokenSecret", - title="Authentication token for the pulsar client.\n+optional", + title=( + "Authentication token for the pulsar client.\nEither token or athenz" + " can be set to use auth.\n+optional" + ), ), ] = None connection_backoff: Annotated[ @@ -2566,6 +2929,94 @@ class NATSEventsSource(BaseModel): url: Annotated[Optional[str], Field(title="URL to connect to NATS cluster")] = None +class KafkaTrigger(BaseModel): + compress: Annotated[ + Optional[bool], + Field( + title=( + "Compress determines whether to compress message or not.\nDefaults to" + " false.\nIf set to true, compresses message using snappy" + " compression.\n+optional" + ) + ), + ] = None + flush_frequency: Annotated[ + Optional[int], + Field( + alias="flushFrequency", + title=( + "FlushFrequency refers to the frequency in milliseconds to flush" + " batches.\nDefaults to 500 milliseconds.\n+optional" + ), + ), + ] = None + parameters: Annotated[ + Optional[List[TriggerParameter]], + Field( + description=("Parameters is the list of parameters that is applied to resolved Kafka" " trigger object.") + ), + ] = None + partition: Annotated[Optional[int], Field(title="+optional\nDEPRECATED")] = None + partitioning_key: Annotated[ + Optional[str], + Field( + alias="partitioningKey", + description=("The partitioning key for the messages put on the Kafka" " topic.\n+optional."), + ), + ] = None + payload: Annotated[ + Optional[List[TriggerParameter]], + Field( + description=( + "Payload is the list of key-value extracted from an event payload to" " construct the request payload." + ) + ), + ] = None + required_acks: Annotated[ + Optional[int], + Field( + alias="requiredAcks", + description=( + "RequiredAcks used in producer to tell the broker how many replica" + " acknowledgements\nDefaults to 1 (Only wait for the leader to" + " ack).\n+optional." + ), + ), + ] = None + sasl: Annotated[ + Optional[SASLConfig], + Field(title="SASL configuration for the kafka client\n+optional"), + ] = None + schema_registry: Annotated[ + Optional[SchemaRegistryConfig], + Field( + alias="schemaRegistry", + title=("Schema Registry configuration to producer message with avro" " format\n+optional"), + ), + ] = None + tls: Annotated[ + Optional[TLSConfig], + Field(title="TLS configuration for the Kafka producer.\n+optional"), + ] = None + topic: Annotated[ + Optional[str], + Field(title=("Name of the topic.\nMore info at" " https://kafka.apache.org/documentation/#intro_topics")), + ] = None + url: Annotated[ + Optional[str], + Field(description="URL of the Kafka broker, multiple URLs separated by comma."), + ] = None + version: Annotated[ + Optional[str], + Field( + title=( + "Specify what kafka version is being connected to enables certain" + " features in sarama, defaults to 1.0.0\n+optional" + ) + ), + ] = None + + class BitbucketEventSource(BaseModel): auth: Annotated[ Optional[BitbucketAuth], @@ -2958,6 +3409,59 @@ class CustomTrigger(BaseModel): ] = None +class EmailTrigger(BaseModel): + body: Annotated[ + Optional[str], + Field(title="Body refers to the body/content of the email send.\n+optional"), + ] = None + from_: Annotated[ + Optional[str], + Field( + alias="from", + title=("From refers to the address from which the email is send" " from.\n+optional"), + ), + ] = None + host: Annotated[ + Optional[str], + Field(description="Host refers to the smtp host url to which email is send."), + ] = None + parameters: Annotated[ + Optional[List[TriggerParameter]], + Field( + title=( + "Parameters is the list of key-value extracted from event's payload" + " that are applied to\nthe trigger resource.\n+optional" + ) + ), + ] = None + port: Annotated[ + Optional[int], + Field(title=("Port refers to the smtp server port to which email is send.\nDefaults" " to 0.\n+optional")), + ] = None + smtp_password: Annotated[ + Optional[v1_1.SecretKeySelector], + Field( + alias="smtpPassword", + title=( + "SMTPPassword refers to the Kubernetes secret that holds the smtp" + " password used to connect to smtp server.\n+optional" + ), + ), + ] = None + subject: Annotated[ + Optional[str], + Field(title="Subject refers to the subject line for the email send.\n+optional"), + ] = None + to: Annotated[ + Optional[List[str]], + Field(title=("To refers to the email addresses to which the emails are" " send.\n+optional")), + ] = None + username: Annotated[ + Optional[str], + Field(title=("Username refers to the username used to connect to the smtp" " server.\n+optional")), + ] = None + + class OpenWhiskTrigger(BaseModel): action_name: Annotated[ Optional[str], @@ -2992,10 +3496,38 @@ class OpenWhiskTrigger(BaseModel): version: Annotated[Optional[str], Field(title="Version for the API.\nDefaults to v1.\n+optional")] = None +class EventSourceStatus(BaseModel): + status: Optional[Status] = None + + +class SensorStatus(BaseModel): + status: Optional[Status] = None + + class SlackTrigger(BaseModel): + attachments: Annotated[ + Optional[str], + Field( + title=( + "Attachments is a JSON format string that represents an array of Slack" + " attachments according to the attachments API:" + " https://api.slack.com/reference/messaging/attachments .\n+optional" + ) + ), + ] = None + blocks: Annotated[ + Optional[str], + Field( + title=( + "Blocks is a JSON format string that represents an array of Slack" + " blocks according to the blocks API:" + " https://api.slack.com/reference/block-kit/blocks .\n+optional" + ) + ), + ] = None channel: Annotated[ Optional[str], - Field(title=("Channel refers to which Slack channel to send slack" " message.\n+optional")), + Field(title=("Channel refers to which Slack channel to send Slack" " message.\n+optional")), ] = None message: Annotated[ Optional[str], @@ -3010,6 +3542,15 @@ class SlackTrigger(BaseModel): ) ), ] = None + sender: Annotated[ + Optional[SlackSender], + Field( + title=( + "Sender refers to additional configuration of the Slack application" + " that sends the message.\n+optional" + ) + ), + ] = None slack_token: Annotated[ Optional[v1_1.SecretKeySelector], Field( @@ -3019,14 +3560,10 @@ class SlackTrigger(BaseModel): ), ), ] = None - - -class EventSourceStatus(BaseModel): - status: Optional[Status] = None - - -class SensorStatus(BaseModel): - status: Optional[Status] = None + thread: Annotated[ + Optional[SlackThread], + Field(title=("Thread refers to additional options for sending messages to a Slack" " thread.\n+optional")), + ] = None class EventDependencyFilter(BaseModel): @@ -3197,6 +3734,15 @@ class TriggerTemplate(BaseModel): title=("AzureEventHubs refers to the trigger send an event to an Azure Event" " Hub.\n+optional"), ), ] = None + azure_service_bus: Annotated[ + Optional[AzureServiceBusTrigger], + Field( + alias="azureServiceBus", + title=( + "AzureServiceBus refers to the trigger designed to place messages on" " Azure Service Bus\n+optional" + ), + ), + ] = None conditions: Annotated[ Optional[str], Field( @@ -3219,6 +3765,10 @@ class TriggerTemplate(BaseModel): ) ), ] = None + email: Annotated[ + Optional[EmailTrigger], + Field(title=("Email refers to the trigger designed to send an email" " notification\n+optional")), + ] = None http: Annotated[ Optional[HTTPTrigger], Field( @@ -3270,6 +3820,18 @@ class TriggerTemplate(BaseModel): class Trigger(BaseModel): + at_least_once: Annotated[ + Optional[bool], + Field( + alias="atLeastOnce", + title=( + "AtLeastOnce determines the trigger execution semantics.\nDefaults to" + " false. Trigger execution will use at-most-once semantics.\nIf set to" + " true, Trigger execution will switch to at-least-once" + " semantics.\n+kubebuilder:default=false\n+optional" + ), + ), + ] = None parameters: Annotated[ Optional[List[TriggerParameter]], Field(title=("Parameters is the list of parameters applied to the trigger template" " definition")), @@ -3406,6 +3968,14 @@ class EventSourceSpec(BaseModel): Optional[Dict[str, AzureEventsHubEventSource]], Field(alias="azureEventsHub", title="AzureEventsHub event sources"), ] = None + azure_queue_storage: Annotated[ + Optional[Dict[str, AzureQueueStorageEventSource]], + Field(alias="azureQueueStorage", title="AzureQueueStorage event source"), + ] = None + azure_service_bus: Annotated[ + Optional[Dict[str, AzureServiceBusEventSource]], + Field(alias="azureServiceBus", title="Azure Service Bus event source"), + ] = None bitbucket: Annotated[ Optional[Dict[str, BitbucketEventSource]], Field(title="Bitbucket event sources"), @@ -3425,6 +3995,7 @@ class EventSourceSpec(BaseModel): ] = None file: Annotated[Optional[Dict[str, FileEventSource]], Field(title="File event sources")] = None generic: Annotated[Optional[Dict[str, GenericEventSource]], Field(title="Generic event source")] = None + gerrit: Annotated[Optional[Dict[str, GerritEventSource]], Field(title="Gerrit event source")] = None github: Annotated[Optional[Dict[str, GithubEventSource]], Field(title="Github event sources")] = None gitlab: Annotated[Optional[Dict[str, GitlabEventSource]], Field(title="Gitlab event sources")] = None hdfs: Annotated[Optional[Dict[str, HDFSEventSource]], Field(title="HDFS event sources")] = None @@ -3449,6 +4020,7 @@ class EventSourceSpec(BaseModel): Optional[Service], Field(title=("Service is the specifications of the service to expose the event" " source\n+optional")), ] = None + sftp: Annotated[Optional[Dict[str, SFTPEventSource]], Field(title="SFTP event sources")] = None slack: Annotated[Optional[Dict[str, SlackEventSource]], Field(title="Slack event sources")] = None sns: Annotated[Optional[Dict[str, SNSEventSource]], Field(title="SNS event sources")] = None sqs: Annotated[Optional[Dict[str, SQSEventSource]], Field(title="SQS event sources")] = None @@ -3487,7 +4059,21 @@ class SensorSpec(BaseModel): title=("EventBusName references to a EventBus name. By default the value is" ' "default"'), ), ] = None + logging_fields: Annotated[ + Optional[Dict[str, str]], + Field( + alias="loggingFields", + title=("LoggingFields add additional key-value pairs when logging" " happens\n+optional"), + ), + ] = None replicas: Annotated[Optional[int], Field(title="Replicas is the sensor deployment replicas")] = None + revision_history_limit: Annotated[ + Optional[int], + Field( + alias="revisionHistoryLimit", + title=("RevisionHistoryLimit specifies how many old deployment revisions to" " retain\n+optional"), + ), + ] = None template: Annotated[ Optional[Template], Field(title="Template is the pod specification for the sensor\n+optional"), diff --git a/src/hera/workflows/models/io/argoproj/workflow/__init__.py b/src/hera/workflows/models/io/argoproj/workflow/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/io/argoproj/workflow/__init__.py +++ b/src/hera/workflows/models/io/argoproj/workflow/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/io/argoproj/workflow/v1alpha1.py b/src/hera/workflows/models/io/argoproj/workflow/v1alpha1.py index ed9dbac4d..d5a91172f 100644 --- a/src/hera/workflows/models/io/argoproj/workflow/v1alpha1.py +++ b/src/hera/workflows/models/io/argoproj/workflow/v1alpha1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -100,28 +100,6 @@ class ArtifactRepositoryRef(BaseModel): ] = None -class ArtifactResult(BaseModel): - error: Annotated[ - Optional[str], - Field(description=("Error is an optional error message which should be set if" " Success==false")), - ] = None - name: Annotated[str, Field(description="Name is the name of the Artifact")] - success: Annotated[ - Optional[bool], - Field(description="Success describes whether the deletion succeeded"), - ] = None - - -class ArtifactResultNodeStatus(BaseModel): - artifact_results: Annotated[ - Optional[Dict[str, ArtifactResult]], - Field( - alias="artifactResults", - description="ArtifactResults maps Artifact name to result of the deletion", - ), - ] = None - - class ClusterWorkflowTemplateDeleteResponse(BaseModel): pass @@ -174,6 +152,20 @@ class CronWorkflowResumeRequest(BaseModel): namespace: Optional[str] = None +class StopStrategy(BaseModel): + expression: Annotated[ + str, + Field( + description=( + "v3.6 and after: Expression is an expression that stops scheduling" + " workflows when true. Use the variables `cronworkflow`.`failed` or" + " `cronworkflow`.`succeeded` to access the number of failed or" + " successful child workflows." + ) + ), + ] + + class CronWorkflowSuspendRequest(BaseModel): name: Optional[str] = None namespace: Optional[str] = None @@ -634,6 +626,10 @@ class CronWorkflowStatus(BaseModel): Optional[List[Condition]], Field(description="Conditions is a list of conditions the CronWorkflow may have"), ] = None + failed: Annotated[ + int, + Field(description=("v3.6 and after: Failed counts how many times child workflows failed")), + ] last_scheduled_time: Annotated[ Optional[v1_1.Time], Field( @@ -641,6 +637,19 @@ class CronWorkflowStatus(BaseModel): description=("LastScheduleTime is the last time the CronWorkflow was scheduled"), ), ] = None + phase: Annotated[ + str, + Field( + description=( + "v3.6 and after: Phase is an enum of Active or Stopped. It changes to" + " Stopped when stopStrategy.expression is true" + ) + ), + ] + succeeded: Annotated[ + int, + Field(description=("v3.6 and after: Succeeded counts how many times child workflows" " succeeded")), + ] class ArtifactoryArtifact(BaseModel): @@ -849,6 +858,15 @@ class GitArtifact(BaseModel): description=("InsecureIgnoreHostKey disables SSH strict host key checking during git" " clone"), ), ] = None + insecure_skip_tls: Annotated[ + Optional[bool], + Field( + alias="insecureSkipTLS", + description=( + "InsecureSkipTLS disables server certificate verification resulting in" " insecure HTTPS connections" + ), + ), + ] = None password_secret: Annotated[ Optional[v1.SecretKeySelector], Field( @@ -951,6 +969,17 @@ class HDFSArtifact(BaseModel): Optional[List[str]], Field(description="Addresses is accessible addresses of HDFS name nodes"), ] = None + data_transfer_protection: Annotated[ + Optional[str], + Field( + alias="dataTransferProtection", + description=( + "DataTransferProtection is the protection level for HDFS data transfer." + " It corresponds to the dfs.data.transfer.protection configuration in" + " HDFS." + ), + ), + ] = None force: Annotated[ Optional[bool], Field(description="Force copies a file forcibly even if it exists"), @@ -1030,6 +1059,17 @@ class HDFSArtifactRepository(BaseModel): Optional[List[str]], Field(description="Addresses is accessible addresses of HDFS name nodes"), ] = None + data_transfer_protection: Annotated[ + Optional[str], + Field( + alias="dataTransferProtection", + description=( + "DataTransferProtection is the protection level for HDFS data transfer." + " It corresponds to the dfs.data.transfer.protection configuration in" + " HDFS." + ), + ), + ] = None force: Annotated[ Optional[bool], Field(description="Force copies a file forcibly even if it exists"), @@ -1216,7 +1256,13 @@ class Backoff(BaseModel): Field( alias="maxDuration", description=( - "MaxDuration is the maximum amount of time allowed for a workflow in" " the backoff strategy" + "MaxDuration is the maximum amount of time allowed for a workflow in" + " the backoff strategy. It is important to note that if the workflow" + " template includes activeDeadlineSeconds, the pod's deadline is" + " initially set with activeDeadlineSeconds. However, when the workflow" + " fails, the pod's deadline is then overridden by maxDuration. This" + " ensures that the workflow does not exceed the specified maximum" + " duration when retries are involved." ), ), ] = None @@ -1233,7 +1279,16 @@ class ContainerSetRetryStrategy(BaseModel): ) ), ] = None - retries: Annotated[intstr.IntOrString, Field(description="Nbr of retries")] + retries: Annotated[ + intstr.IntOrString, + Field( + description=( + "Retries is the maximum number of retry attempts for each container. It" + " does not include the first, original attempt; the maximum number of" + " total attempts will be `retries + 1`." + ) + ), + ] class Sequence(BaseModel): @@ -1612,6 +1667,15 @@ class S3Artifact(BaseModel): description=("SecretKeySecret is the secret selector to the bucket's secret key"), ), ] = None + session_token_secret: Annotated[ + Optional[v1.SecretKeySelector], + Field( + alias="sessionTokenSecret", + description=( + "SessionTokenSecret is used for ephemeral credentials like an IAM" " assume role or S3 access grant" + ), + ), + ] = None use_sdk_creds: Annotated[ Optional[bool], Field( @@ -1690,6 +1754,15 @@ class S3ArtifactRepository(BaseModel): description=("SecretKeySecret is the secret selector to the bucket's secret key"), ), ] = None + session_token_secret: Annotated[ + Optional[v1.SecretKeySelector], + Field( + alias="sessionTokenSecret", + description=( + "SessionTokenSecret is used for ephemeral credentials like an IAM" " assume role or S3 access grant" + ), + ), + ] = None use_sdk_creds: Annotated[ Optional[bool], Field( @@ -1716,10 +1789,21 @@ class Memoize(BaseModel): class Synchronization(BaseModel): - mutex: Annotated[Optional[Mutex], Field(description="Mutex holds the Mutex lock details")] = None + mutex: Annotated[ + Optional[Mutex], + Field(description=("Mutex holds the Mutex lock details - deprecated, use mutexes instead")), + ] = None + mutexes: Annotated[ + Optional[List[Mutex]], + Field(description="v3.6 and after: Mutexes holds the list of Mutex lock details"), + ] = None semaphore: Annotated[ Optional[SemaphoreRef], - Field(description="Semaphore holds the Semaphore configuration"), + Field(description=("Semaphore holds the Semaphore configuration - deprecated, use" " semaphores instead")), + ] = None + semaphores: Annotated[ + Optional[List[SemaphoreRef]], + Field(description=("v3.6 and after: Semaphores holds the list of Semaphores configuration")), ] = None @@ -2181,20 +2265,6 @@ class ManifestFrom(BaseModel): artifact: Annotated[Artifact, Field(description="Artifact contains the artifact to use")] -class ArtifactNodeSpec(BaseModel): - archive_location: Annotated[ - Optional[ArtifactLocation], - Field( - alias="archiveLocation", - description=("ArchiveLocation is the template-level Artifact location specification"), - ), - ] = None - artifacts: Annotated[ - Optional[Dict[str, Artifact]], - Field(description="Artifacts maps artifact name to Artifact description"), - ] = None - - class DataSource(BaseModel): artifact_paths: Annotated[ Optional[ArtifactPaths], @@ -2298,26 +2368,6 @@ class Arguments(BaseModel): ] = None -class ArtifactGCSpec(BaseModel): - artifacts_by_node: Annotated[ - Optional[Dict[str, ArtifactNodeSpec]], - Field( - alias="artifactsByNode", - description=("ArtifactsByNode maps Node name to information pertaining to Artifacts" " on that Node"), - ), - ] = None - - -class ArtifactGCStatus(BaseModel): - artifact_results_by_node: Annotated[ - Optional[Dict[str, ArtifactResultNodeStatus]], - Field( - alias="artifactResultsByNode", - description="ArtifactResultsByNode maps Node name to result", - ), - ] = None - - class InfoResponse(BaseModel): columns: Optional[List[Column]] = None links: Optional[List[Link]] = None @@ -2434,13 +2484,6 @@ class HTTP(BaseModel): url: Annotated[str, Field(description="URL of the HTTP Request")] -class NodeResult(BaseModel): - message: Optional[str] = None - outputs: Optional[Outputs] = None - phase: Optional[str] = None - progress: Optional[str] = None - - class NodeStatus(BaseModel): boundary_id: Annotated[ Optional[str], @@ -2627,7 +2670,7 @@ class NodeStatus(BaseModel): class PodGC(BaseModel): delete_delay_duration: Annotated[ - Optional[v1_1.Duration], + Optional[str], Field( alias="deleteDelayDuration", description=("DeleteDelayDuration specifies the duration before pods in the GC queue" " get deleted."), @@ -2818,12 +2861,13 @@ class ContainerNode(BaseModel): Optional[List[v1.ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -2839,6 +2883,13 @@ class ContainerNode(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[v1.ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[v1.ResourceRequirements], Field( @@ -2849,6 +2900,30 @@ class ContainerNode(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[v1.SecurityContext], Field( @@ -3079,12 +3154,13 @@ class ScriptTemplate(BaseModel): Optional[List[v1.ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -3100,6 +3176,13 @@ class ScriptTemplate(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[v1.ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[v1.ResourceRequirements], Field( @@ -3110,6 +3193,30 @@ class ScriptTemplate(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[v1.SecurityContext], Field( @@ -3357,12 +3464,13 @@ class UserContainer(BaseModel): Optional[List[v1.ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -3378,6 +3486,13 @@ class UserContainer(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[v1.ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[v1.ResourceRequirements], Field( @@ -3388,6 +3503,30 @@ class UserContainer(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[v1.SecurityContext], Field( @@ -3509,10 +3648,6 @@ class UserContainer(BaseModel): ] = None -class WorkflowTaskSetStatus(BaseModel): - nodes: Optional[Dict[str, NodeResult]] = None - - class WorkflowEventBindingList(BaseModel): api_version: Annotated[ Optional[str], @@ -3548,9 +3683,10 @@ class ContainerSetTemplate(BaseModel): Field( alias="retryStrategy", description=( - "RetryStrategy describes how to retry a container nodes in the" - " container set if it fails. Nbr of retries(default 0) and sleep" - " duration between retries(default 0s, instant retry) can be set." + "RetryStrategy describes how to retry container nodes if the container" + " set fails. Note that this works differently from the template-level" + " `retryStrategy` as it is a process-level retry that does not create" + " new Pods or containers." ), ), ] = None @@ -3586,10 +3722,6 @@ class ParallelSteps(BaseModel): __root__: List[WorkflowStep] -class WorkflowTaskSetSpec(BaseModel): - tasks: Optional[Dict[str, Template]] = None - - class ClusterWorkflowTemplateList(BaseModel): api_version: Annotated[ Optional[str], @@ -4129,11 +4261,11 @@ class WorkflowSpec(BaseModel): Field( alias="dnsPolicy", description=( - 'Set DNS policy for the pod. Defaults to "ClusterFirst". Valid values' - " are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default' or" - " 'None'. DNS parameters given in DNSConfig will be merged with the" - " policy selected with DNSPolicy. To have DNS options set along with" - " hostNetwork, you have to specify DNS policy explicitly to" + 'Set DNS policy for workflow pods. Defaults to "ClusterFirst". Valid' + " values are 'ClusterFirstWithHostNet', 'ClusterFirst', 'Default'" + " or 'None'. DNS parameters given in DNSConfig will be merged with" + " the policy selected with DNSPolicy. To have DNS options set along" + " with hostNetwork, you have to specify DNS policy explicitly to" " 'ClusterFirstWithHostNet'." ), ), @@ -4537,9 +4669,13 @@ class CronWorkflowSpec(BaseModel): ), ] = None schedule: Annotated[ - str, - Field(description="Schedule is a schedule to run the Workflow in Cron format"), - ] + Optional[str], + Field(description=("Schedule is a schedule to run the Workflow in Cron format. Deprecated," " use Schedules")), + ] = None + schedules: Annotated[ + Optional[List[str]], + Field(description=("v3.6 and after: Schedules is a list of schedules to run the Workflow" " in Cron format")), + ] = None starting_deadline_seconds: Annotated[ Optional[int], Field( @@ -4551,6 +4687,16 @@ class CronWorkflowSpec(BaseModel): ), ), ] = None + stop_strategy: Annotated[ + Optional[StopStrategy], + Field( + alias="stopStrategy", + description=( + "v3.6 and after: StopStrategy defines if the CronWorkflow should stop" + " scheduling based on a condition" + ), + ), + ] = None successful_jobs_history_limit: Annotated[ Optional[int], Field( @@ -4571,6 +4717,10 @@ class CronWorkflowSpec(BaseModel): ) ), ] = None + when: Annotated[ + Optional[str], + Field(description=("v3.6 and after: When is an expression that determines if a run should" " be scheduled.")), + ] = None workflow_metadata: Annotated[ Optional[v1_1.ObjectMeta], Field( @@ -4877,7 +5027,6 @@ class WorkflowWatchEvent(BaseModel): DAGTemplate.update_forward_refs() ParallelSteps.update_forward_refs() -WorkflowTaskSetSpec.update_forward_refs() ClusterWorkflowTemplateList.update_forward_refs() CronWorkflowList.update_forward_refs() WorkflowList.update_forward_refs() diff --git a/src/hera/workflows/models/io/k8s/api/core/__init__.py b/src/hera/workflows/models/io/k8s/api/core/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/io/k8s/api/core/__init__.py +++ b/src/hera/workflows/models/io/k8s/api/core/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/io/k8s/api/core/v1.py b/src/hera/workflows/models/io/k8s/api/core/v1.py index be7b2121b..62d4e8ce7 100644 --- a/src/hera/workflows/models/io/k8s/api/core/v1.py +++ b/src/hera/workflows/models/io/k8s/api/core/v1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -22,7 +22,9 @@ class SecretKeySelector(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -39,7 +41,9 @@ class ConfigMapKeySelector(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -56,10 +60,10 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is the filesystem type of the volume that you want to mount." + " Tip: Ensure that the filesystem type is supported by the host" + ' operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' + ' inferred to be "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), ), @@ -68,10 +72,10 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Optional[int], Field( description=( - "The partition in the volume that you want to mount. If omitted, the" - " default is to mount by volume name. Examples: For volume /dev/sda1," - ' you specify the partition as "1". Similarly, the volume partition for' - ' /dev/sda is "0" (or you can leave the property empty).' + "partition is the partition in the volume that you want to mount. If" + " omitted, the default is to mount by volume name. Examples: For volume" + ' /dev/sda1, you specify the partition as "1". Similarly, the volume' + ' partition for /dev/sda is "0" (or you can leave the property empty).' ) ), ] = None @@ -80,8 +84,8 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Field( alias="readOnly", description=( - 'Specify "true" to force and set the ReadOnly property in VolumeMounts' - ' to "true". If omitted, the default is "false". More info:' + "readOnly value true will force the readOnly setting in VolumeMounts." + " More info:" " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), ), @@ -91,41 +95,70 @@ class AWSElasticBlockStoreVolumeSource(BaseModel): Field( alias="volumeID", description=( - "Unique ID of the persistent disk resource in AWS (Amazon EBS volume)." - " More info:" + "volumeID is unique ID of the persistent disk resource in AWS (Amazon" + " EBS volume). More info:" " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), ), ] +class AppArmorProfile(BaseModel): + localhost_profile: Annotated[ + Optional[str], + Field( + alias="localhostProfile", + description=( + "localhostProfile indicates a profile loaded on the node that should be" + " used. The profile must be preconfigured on the node to work. Must" + " match the loaded name of the profile. Must be set if and only if type" + ' is "Localhost".' + ), + ), + ] = None + type: Annotated[ + str, + Field( + description=( + "type indicates which kind of AppArmor profile will be applied. Valid" + " options are:\n Localhost - a profile pre-loaded on the node.\n " + " RuntimeDefault - the container runtime's default profile.\n " + " Unconfined - no AppArmor enforcement." + ) + ), + ] + + class AzureDiskVolumeSource(BaseModel): caching_mode: Annotated[ Optional[str], Field( alias="cachingMode", - description="Host Caching mode: None, Read Only, Read Write.", + description=("cachingMode is the Host Caching mode: None, Read Only, Read Write."), ), ] = None disk_name: Annotated[ str, Field( alias="diskName", - description="The Name of the data disk in the blob storage", + description="diskName is the Name of the data disk in the blob storage", ), ] disk_uri: Annotated[ str, - Field(alias="diskURI", description="The URI the data disk in the blob storage"), + Field( + alias="diskURI", + description="diskURI is the URI of data disk in the blob storage", + ), ] fs_type: Annotated[ Optional[str], Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is Filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -133,10 +166,10 @@ class AzureDiskVolumeSource(BaseModel): Optional[str], Field( description=( - "Expected values Shared: multiple blob disks per storage account " - " Dedicated: single blob disk per storage account Managed: azure" - " managed data disk (only in managed availability set). defaults to" - " shared" + "kind expected values are Shared: multiple blob disks per storage" + " account Dedicated: single blob disk per storage account Managed:" + " azure managed data disk (only in managed availability set). defaults" + " to shared" ) ), ] = None @@ -145,7 +178,8 @@ class AzureDiskVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly Defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -157,7 +191,8 @@ class AzureFileVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -165,10 +200,10 @@ class AzureFileVolumeSource(BaseModel): str, Field( alias="secretName", - description=("the name of secret that contains Azure Storage Account Name and Key"), + description=("secretName is the name of secret that contains Azure Storage Account" " Name and Key"), ), ] - share_name: Annotated[str, Field(alias="shareName", description="Share Name")] + share_name: Annotated[str, Field(alias="shareName", description="shareName is the azure share Name")] class LocalObjectReference(BaseModel): @@ -176,7 +211,9 @@ class LocalObjectReference(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -193,7 +230,9 @@ class ConfigMapEnvSource(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -204,12 +243,6 @@ class ConfigMapEnvSource(BaseModel): ] = None -class Protocol(Enum): - sctp = "SCTP" - tcp = "TCP" - udp = "UDP" - - class ContainerPort(BaseModel): container_port: Annotated[ int, @@ -246,15 +279,31 @@ class ContainerPort(BaseModel): ), ] = None protocol: Annotated[ - Optional[Protocol], + Optional[str], + Field(description=('Protocol for port. Must be UDP, TCP, or SCTP. Defaults to "TCP".')), + ] = None + + +class ContainerResizePolicy(BaseModel): + resource_name: Annotated[ + str, Field( + alias="resourceName", description=( - "Protocol for port. Must be UDP, TCP, or SCTP. Defaults to" - ' "TCP".\n\nPossible enum values:\n - `"SCTP"` is the SCTP protocol.\n' - ' - `"TCP"` is the TCP protocol.\n - `"UDP"` is the UDP protocol.' - ) + "Name of the resource to which this resource resize policy applies." " Supported values: cpu, memory." + ), ), - ] = None + ] + restart_policy: Annotated[ + str, + Field( + alias="restartPolicy", + description=( + "Restart policy to apply when specified resource is resized. If not" + " specified, it defaults to NotRequired." + ), + ), + ] class ObjectFieldSelector(BaseModel): @@ -279,7 +328,9 @@ class SecretEnvSource(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -385,33 +436,36 @@ class FCVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None - lun: Annotated[Optional[int], Field(description="Optional: FC target lun number")] = None + lun: Annotated[Optional[int], Field(description="lun is Optional: FC target lun number")] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" - " ReadOnly setting in VolumeMounts." + "readOnly is Optional: Defaults to false (read/write). ReadOnly here" + " will force the ReadOnly setting in VolumeMounts." ), ), ] = None target_ww_ns: Annotated[ Optional[List[str]], - Field(alias="targetWWNs", description="Optional: FC target worldwide names (WWNs)"), + Field( + alias="targetWWNs", + description="targetWWNs is Optional: FC target worldwide names (WWNs)", + ), ] = None wwids: Annotated[ Optional[List[str]], Field( description=( - "Optional: FC volume world wide identifiers (wwids) Either wwids or" - " combination of targetWWNs and lun must be set, but not both" + "wwids Optional: FC volume world wide identifiers (wwids) Either wwids" + " or combination of targetWWNs and lun must be set, but not both" " simultaneously." ) ), @@ -424,8 +478,8 @@ class FlockerVolumeSource(BaseModel): Field( alias="datasetName", description=( - "Name of the dataset stored as metadata -> name on the dataset for" - " Flocker should be considered as deprecated" + "datasetName is Name of the dataset stored as metadata -> name on the" + " dataset for Flocker should be considered as deprecated" ), ), ] = None @@ -433,7 +487,7 @@ class FlockerVolumeSource(BaseModel): Optional[str], Field( alias="datasetUUID", - description=("UUID of the dataset. This is unique identifier of a Flocker dataset"), + description=("datasetUUID is the UUID of the dataset. This is unique identifier of a" " Flocker dataset"), ), ] = None @@ -444,10 +498,10 @@ class GCEPersistentDiskVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is filesystem type of the volume that you want to mount. Tip:" + " Ensure that the filesystem type is supported by the host operating" + ' system. Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be' + ' "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), ), @@ -456,10 +510,11 @@ class GCEPersistentDiskVolumeSource(BaseModel): Optional[int], Field( description=( - "The partition in the volume that you want to mount. If omitted, the" - " default is to mount by volume name. Examples: For volume /dev/sda1," - ' you specify the partition as "1". Similarly, the volume partition for' - ' /dev/sda is "0" (or you can leave the property empty). More info:' + "partition is the partition in the volume that you want to mount. If" + " omitted, the default is to mount by volume name. Examples: For volume" + ' /dev/sda1, you specify the partition as "1". Similarly, the volume' + ' partition for /dev/sda is "0" (or you can leave the property empty).' + " More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ) ), @@ -469,8 +524,8 @@ class GCEPersistentDiskVolumeSource(BaseModel): Field( alias="pdName", description=( - "Unique name of the PD resource in GCE. Used to identify the disk in" - " GCE. More info:" + "pdName is unique name of the PD resource in GCE. Used to identify the" + " disk in GCE. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), ), @@ -480,7 +535,7 @@ class GCEPersistentDiskVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the ReadOnly setting in VolumeMounts." + "readOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), @@ -511,15 +566,18 @@ class GitRepoVolumeSource(BaseModel): Optional[str], Field( description=( - "Target directory name. Must not contain or start with '..'. If '.' is" - " supplied, the volume directory will be the git repository. " - " Otherwise, if specified, the volume will contain the git repository" - " in the subdirectory with the given name." + "directory is the target directory name. Must not contain or start with" + " '..'. If '.' is supplied, the volume directory will be the git" + " repository. Otherwise, if specified, the volume will contain the git" + " repository in the subdirectory with the given name." ) ), ] = None - repository: Annotated[str, Field(description="Repository URL")] - revision: Annotated[Optional[str], Field(description="Commit hash for the specified revision.")] = None + repository: Annotated[str, Field(description="repository is the URL")] + revision: Annotated[ + Optional[str], + Field(description="revision is the commit hash for the specified revision."), + ] = None class GlusterfsVolumeSource(BaseModel): @@ -527,8 +585,8 @@ class GlusterfsVolumeSource(BaseModel): str, Field( description=( - "EndpointsName is the endpoint name that details Glusterfs topology." - " More info:" + "endpoints is the endpoint name that details Glusterfs topology. More" + " info:" " https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" ) ), @@ -537,7 +595,7 @@ class GlusterfsVolumeSource(BaseModel): str, Field( description=( - "Path is the Glusterfs volume path. More info:" + "path is the Glusterfs volume path. More info:" " https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" ) ), @@ -547,7 +605,7 @@ class GlusterfsVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the Glusterfs volume to be mounted with" + "readOnly here will force the Glusterfs volume to be mounted with" " read-only permissions. Defaults to false. More info:" " https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod" ), @@ -555,19 +613,22 @@ class GlusterfsVolumeSource(BaseModel): ] = None -class Scheme(Enum): - http = "HTTP" - https = "HTTPS" - - class HTTPHeader(BaseModel): - name: Annotated[str, Field(description="The header field name")] + name: Annotated[ + str, + Field( + description=( + "The header field name. This will be canonicalized upon output, so" + " case-variant names will be understood as the same header." + ) + ), + ] value: Annotated[str, Field(description="The header field value")] class HostAlias(BaseModel): hostnames: Annotated[Optional[List[str]], Field(description="Hostnames for the above IP address.")] = None - ip: Annotated[Optional[str], Field(description="IP address of the host file entry.")] = None + ip: Annotated[str, Field(description="IP address of the host file entry.")] class HostPathVolumeSource(BaseModel): @@ -575,7 +636,7 @@ class HostPathVolumeSource(BaseModel): str, Field( description=( - "Path of the directory on the host. If the path is a symlink, it will" + "path of the directory on the host. If the path is a symlink, it will" " follow the link to the real path. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#hostpath" ) @@ -585,7 +646,7 @@ class HostPathVolumeSource(BaseModel): Optional[str], Field( description=( - 'Type for HostPath Volume Defaults to "" More info:' + 'type for HostPath Volume Defaults to "" More info:' " https://kubernetes.io/docs/concepts/storage/volumes#hostpath" ) ), @@ -593,14 +654,14 @@ class HostPathVolumeSource(BaseModel): class KeyToPath(BaseModel): - key: Annotated[str, Field(description="The key to project.")] + key: Annotated[str, Field(description="key is the key to project.")] mode: Annotated[ Optional[int], Field( description=( - "Optional: mode bits used to set permissions on this file. Must be an" - " octal value between 0000 and 0777 or a decimal value between 0 and" - " 511. YAML accepts both octal and decimal values, JSON requires" + "mode is Optional: mode bits used to set permissions on this file. Must" + " be an octal value between 0000 and 0777 or a decimal value between 0" + " and 511. YAML accepts both octal and decimal values, JSON requires" " decimal values for mode bits. If not specified, the volume" " defaultMode will be used. This might be in conflict with other" " options that affect the file mode, like fsGroup, and the result can" @@ -612,7 +673,7 @@ class KeyToPath(BaseModel): str, Field( description=( - "The relative path of the file to map the key to. May not be an" + "path is the relative path of the file to map the key to. May not be an" " absolute path. May not contain the path element '..'. May not start" " with the string '..'." ) @@ -620,12 +681,46 @@ class KeyToPath(BaseModel): ] +class SleepAction(BaseModel): + seconds: Annotated[int, Field(description="Seconds is the number of seconds to sleep.")] + + +class ModifyVolumeStatus(BaseModel): + status: Annotated[ + str, + Field( + description=( + "status is the status of the ControllerModifyVolume operation. It can" + " be in any of following states:\n - Pending\n Pending indicates that" + " the PersistentVolumeClaim cannot be modified due to unmet" + " requirements, such as\n the specified VolumeAttributesClass not" + " existing.\n - InProgress\n InProgress indicates that the volume is" + " being modified.\n - Infeasible\n Infeasible indicates that the" + " request has been rejected as invalid by the CSI driver. To\n\t " + " resolve the error, a valid VolumeAttributesClass needs to be" + " specified.\nNote: New statuses can be added in the future. Consumers" + " should check for unknown statuses and fail appropriately." + ) + ), + ] + target_volume_attributes_class_name: Annotated[ + Optional[str], + Field( + alias="targetVolumeAttributesClassName", + description=( + "targetVolumeAttributesClassName is the name of the" + " VolumeAttributesClass the PVC currently being reconciled" + ), + ), + ] = None + + class NFSVolumeSource(BaseModel): path: Annotated[ str, Field( description=( - "Path that is exported by the NFS server. More info:" + "path that is exported by the NFS server. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#nfs" ) ), @@ -635,7 +730,7 @@ class NFSVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the NFS export to be mounted with read-only" + "readOnly here will force the NFS export to be mounted with read-only" " permissions. Defaults to false. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#nfs" ), @@ -645,32 +740,21 @@ class NFSVolumeSource(BaseModel): str, Field( description=( - "Server is the hostname or IP address of the NFS server. More info:" + "server is the hostname or IP address of the NFS server. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#nfs" ) ), ] -class Operator(Enum): - does_not_exist = "DoesNotExist" - exists = "Exists" - gt = "Gt" - in_ = "In" - lt = "Lt" - not_in = "NotIn" - - class NodeSelectorRequirement(BaseModel): key: Annotated[str, Field(description="The label key that the selector applies to.")] operator: Annotated[ - Operator, + str, Field( description=( "Represents a key's relationship to a set of values. Valid operators" - " are In, NotIn, Exists, DoesNotExist. Gt, and Lt.\n\nPossible enum" - ' values:\n - `"DoesNotExist"`\n - `"Exists"`\n - `"Gt"`\n - `"In"`\n -' - ' `"Lt"`\n - `"NotIn"`' + " are In, NotIn, Exists, DoesNotExist. Gt, and Lt." ) ), ] @@ -705,13 +789,23 @@ class NodeSelectorTerm(BaseModel): ] = None -class Phase(Enum): - bound = "Bound" - lost = "Lost" - pending = "Pending" +class TypedLocalObjectReference(BaseModel): + api_group: Annotated[ + Optional[str], + Field( + alias="apiGroup", + 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." + ), + ), + ] = None + kind: Annotated[str, Field(description="Kind is the type of resource being referenced")] + name: Annotated[str, Field(description="Name is the name of resource being referenced")] -class TypedLocalObjectReference(BaseModel): +class TypedObjectReference(BaseModel): api_group: Annotated[ Optional[str], Field( @@ -725,6 +819,44 @@ class TypedLocalObjectReference(BaseModel): ] = None kind: Annotated[str, Field(description="Kind is the type of resource being referenced")] name: Annotated[str, Field(description="Name is the name of resource being referenced")] + namespace: Annotated[ + Optional[str], + Field( + description=( + "Namespace is the namespace of resource being referenced Note that when" + " a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant" + " object is required in the referent namespace to allow that" + " namespace's owner to accept the reference. See the ReferenceGrant" + " documentation for details. (Alpha) This field requires the" + " CrossNamespaceVolumeDataSource feature gate to be enabled." + ) + ), + ] = None + + +class VolumeResourceRequirements(BaseModel): + limits: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field( + description=( + "Limits describes the maximum amount of compute resources allowed. More" + " info:" + " https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + ) + ), + ] = None + requests: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field( + 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. Requests cannot exceed Limits. More info:" + " https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" + ) + ), + ] = None class PersistentVolumeClaimVolumeSource(BaseModel): @@ -733,7 +865,7 @@ class PersistentVolumeClaimVolumeSource(BaseModel): Field( alias="claimName", description=( - "ClaimName is the name of a PersistentVolumeClaim in the same namespace" + "claimName is the name of a PersistentVolumeClaim in the same namespace" " as the pod using this volume. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ), @@ -743,7 +875,7 @@ class PersistentVolumeClaimVolumeSource(BaseModel): Optional[bool], Field( alias="readOnly", - description=("Will force the ReadOnly setting in VolumeMounts. Default false."), + description=("readOnly Will force the ReadOnly setting in VolumeMounts. Default" " false."), ), ] = None @@ -754,9 +886,9 @@ class PhotonPersistentDiskVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -764,7 +896,7 @@ class PhotonPersistentDiskVolumeSource(BaseModel): str, Field( alias="pdID", - description="ID that identifies Photon Controller persistent disk", + description=("pdID is the ID that identifies Photon Controller persistent disk"), ), ] @@ -793,12 +925,6 @@ class SELinuxOptions(BaseModel): ] = None -class Type(Enum): - localhost = "Localhost" - runtime_default = "RuntimeDefault" - unconfined = "Unconfined" - - class SeccompProfile(BaseModel): localhost_profile: Annotated[ Optional[str], @@ -808,25 +934,19 @@ class SeccompProfile(BaseModel): "localhostProfile indicates a profile defined in a file on the node" " should be used. The profile must be preconfigured on the node to" " work. Must be a descending path, relative to the kubelet's" - " configured seccomp profile location. Must only be set if type is" - ' "Localhost".' + " configured seccomp profile location. Must be set if type is" + ' "Localhost". Must NOT be set for any other type.' ), ), ] = None type: Annotated[ - Type, + str, Field( description=( "type indicates which kind of seccomp profile will be applied. Valid" " options are:\n\nLocalhost - a profile defined in a file on the node" " should be used. RuntimeDefault - the container runtime default" - " profile should be used. Unconfined - no profile should be" - ' applied.\n\nPossible enum values:\n - `"Localhost"` indicates a' - " profile defined in a file on the node should be used. The file's" - " location relative to /seccomp.\n -" - ' `"RuntimeDefault"` represents the default container runtime seccomp' - ' profile.\n - `"Unconfined"` indicates no seccomp profile is applied' - " (A.K.A. unconfined)." + " profile should be used. Unconfined - no profile should be applied." ) ), ] @@ -858,14 +978,10 @@ class WindowsSecurityContextOptions(BaseModel): alias="hostProcess", description=( "HostProcess determines if a container should be run as a 'Host" - " Process' container. This field is alpha-level and will only be" - " honored by components that enable the WindowsHostProcessContainers" - " feature flag. Setting this field without the feature flag will result" - " in errors when validating the Pod. All of a Pod's containers must" - " have the same effective HostProcess value (it is not allowed to have" - " a mix of HostProcess containers and non-HostProcess containers). In" - " addition, if HostProcess is true then HostNetwork must also be set to" - " true." + " Process' container. All of a Pod's containers must have the same" + " effective HostProcess value (it is not allowed to have a mix of" + " HostProcess containers and non-HostProcess containers). In addition," + " if HostProcess is true then HostNetwork must also be set to true." ), ), ] = None @@ -890,7 +1006,7 @@ class PortworxVolumeSource(BaseModel): Field( alias="fsType", description=( - "FSType represents the filesystem type to mount Must be a filesystem" + "fSType represents the filesystem type to mount Must be a filesystem" ' type supported by the host operating system. Ex. "ext4", "xfs".' ' Implicitly inferred to be "ext4" if unspecified.' ), @@ -901,7 +1017,8 @@ class PortworxVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -909,7 +1026,7 @@ class PortworxVolumeSource(BaseModel): str, Field( alias="volumeID", - description="VolumeID uniquely identifies a Portworx volume", + description="volumeID uniquely identifies a Portworx volume", ), ] @@ -917,14 +1034,14 @@ class PortworxVolumeSource(BaseModel): class QuobyteVolumeSource(BaseModel): group: Annotated[ Optional[str], - Field(description="Group to map volume access to Default is no group"), + Field(description="group to map volume access to Default is no group"), ] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "ReadOnly here will force the Quobyte volume to be mounted with" + "readOnly here will force the Quobyte volume to be mounted with" " read-only permissions. Defaults to false." ), ), @@ -933,7 +1050,7 @@ class QuobyteVolumeSource(BaseModel): str, Field( description=( - "Registry represents a single or multiple Quobyte Registry services" + "registry represents a single or multiple Quobyte Registry services" " specified as a string as host:port pair (multiple entries are" " separated with commas) which acts as the central registry for volumes" ) @@ -943,18 +1060,31 @@ class QuobyteVolumeSource(BaseModel): Optional[str], Field( description=( - "Tenant owning the given Quobyte volume in the Backend Used with" + "tenant owning the given Quobyte volume in the Backend Used with" " dynamically provisioned Quobyte volumes, value is set by the plugin" ) ), ] = None user: Annotated[ Optional[str], - Field(description="User to map volume access to Defaults to serivceaccount user"), + Field(description="user to map volume access to Defaults to serivceaccount user"), ] = None volume: Annotated[ str, - Field(description=("Volume is a string that references an already created Quobyte volume" " by name.")), + Field(description=("volume is a string that references an already created Quobyte volume" " by name.")), + ] + + +class ResourceClaim(BaseModel): + name: Annotated[ + str, + Field( + description=( + "Name must match the name of one entry in pod.spec.resourceClaims of" + " the Pod where this field is used. It makes that resource available" + " inside a container." + ) + ), ] @@ -963,7 +1093,7 @@ class SecretProjection(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items if unspecified, each key-value pair in the Data field of the" " referenced Secret will be projected into the volume as a file whose" " name is the key and content is the value. If specified, the listed" " keys will be projected into the specified paths, and unlisted keys" @@ -978,14 +1108,16 @@ class SecretProjection(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the Secret or its key must be defined"), + Field(description=("optional field specify whether the Secret or its key must be defined")), ] = None @@ -995,10 +1127,10 @@ class SecretVolumeSource(BaseModel): Field( alias="defaultMode", description=( - "Optional: mode bits used to set permissions on created files by" - " default. Must be an octal value between 0000 and 0777 or a decimal" - " value between 0 and 511. YAML accepts both octal and decimal values," - " JSON requires decimal values for mode bits. Defaults to 0644." + "defaultMode is Optional: mode bits used to set permissions on created" + " files by default. Must be an octal value between 0000 and 0777 or a" + " decimal value between 0 and 511. YAML accepts both octal and decimal" + " values, JSON requires decimal values for mode bits. Defaults to 0644." " Directories within the path are not affected by this setting. This" " might be in conflict with other options that affect the file mode," " like fsGroup, and the result can be other mode bits set." @@ -1009,7 +1141,7 @@ class SecretVolumeSource(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items If unspecified, each key-value pair in the Data field of the" " referenced Secret will be projected into the volume as a file whose" " name is the key and content is the value. If specified, the listed" " keys will be projected into the specified paths, and unlisted keys" @@ -1022,15 +1154,15 @@ class SecretVolumeSource(BaseModel): ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the Secret or its keys must be defined"), + Field(description=("optional field specify whether the Secret or its keys must be defined")), ] = None secret_name: Annotated[ Optional[str], Field( alias="secretName", description=( - "Name of the secret in the pod's namespace to use. More info:" - " https://kubernetes.io/docs/concepts/storage/volumes#secret" + "secretName is the name of the secret in the pod's namespace to use." + " More info: https://kubernetes.io/docs/concepts/storage/volumes#secret" ), ), ] = None @@ -1041,7 +1173,7 @@ class ServiceAccountTokenProjection(BaseModel): Optional[str], Field( description=( - "Audience is the intended audience of the token. A recipient of a token" + "audience is the intended audience of the token. A recipient of a token" " must identify itself with an identifier specified in the audience of" " the token, and otherwise should reject the token. The audience" " defaults to the identifier of the apiserver." @@ -1053,7 +1185,7 @@ class ServiceAccountTokenProjection(BaseModel): Field( alias="expirationSeconds", description=( - "ExpirationSeconds is the requested duration of validity of the service" + "expirationSeconds is the requested duration of validity of the service" " account token. As the token approaches expiration, the kubelet volume" " plugin will proactively rotate the service account token. The kubelet" " will start trying to rotate the token if the token is older than 80" @@ -1064,7 +1196,7 @@ class ServiceAccountTokenProjection(BaseModel): ] = None path: Annotated[ str, - Field(description=("Path is the path relative to the mount point of the file to project" " the token into.")), + Field(description=("path is the path relative to the mount point of the file to project" " the token into.")), ] @@ -1073,34 +1205,14 @@ class Sysctl(BaseModel): value: Annotated[str, Field(description="Value of a property to set")] -class Effect(Enum): - no_execute = "NoExecute" - no_schedule = "NoSchedule" - prefer_no_schedule = "PreferNoSchedule" - - -class OperatorModel(Enum): - equal = "Equal" - exists = "Exists" - - class Toleration(BaseModel): effect: Annotated[ - Optional[Effect], + Optional[str], Field( description=( "Effect indicates the taint effect to match. Empty means match all" " taint effects. When specified, allowed values are NoSchedule," - " PreferNoSchedule and NoExecute.\n\nPossible enum values:\n -" - ' `"NoExecute"` Evict any already-running pods that do not tolerate the' - ' taint. Currently enforced by NodeController.\n - `"NoSchedule"` Do' - " not allow new pods to schedule onto the node unless they tolerate the" - " taint, but allow all pods submitted to Kubelet without going through" - " the scheduler to start, and allow all already-running pods to" - ' continue running. Enforced by the scheduler.\n - `"PreferNoSchedule"`' - " Like TaintEffectNoSchedule, but the scheduler tries not to schedule" - " new pods onto the node, rather than prohibiting new pods from" - " scheduling onto the node entirely. Enforced by the scheduler." + " PreferNoSchedule and NoExecute." ) ), ] = None @@ -1115,14 +1227,13 @@ class Toleration(BaseModel): ), ] = None operator: Annotated[ - Optional[OperatorModel], + Optional[str], Field( description=( - "Operator represents a key's relationship to the value. Valid" - " operators are Exists and Equal. Defaults to Equal. Exists is" - " equivalent to wildcard for value, so that a pod can tolerate all" - " taints of a particular category.\n\nPossible enum values:\n -" - ' `"Equal"`\n - `"Exists"`' + "Operator represents a key's relationship to the value. Valid operators" + " are Exists and Equal. Defaults to Equal. Exists is equivalent to" + " wildcard for value, so that a pod can tolerate all taints of a" + " particular category." ) ), ] = None @@ -1156,9 +1267,9 @@ class VsphereVirtualDiskVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -1167,7 +1278,8 @@ class VsphereVirtualDiskVolumeSource(BaseModel): Field( alias="storagePolicyID", description=( - "Storage Policy Based Management (SPBM) profile ID associated with the" " StoragePolicyName." + "storagePolicyID is the storage Policy Based Management (SPBM) profile" + " ID associated with the StoragePolicyName." ), ), ] = None @@ -1175,12 +1287,15 @@ class VsphereVirtualDiskVolumeSource(BaseModel): Optional[str], Field( alias="storagePolicyName", - description="Storage Policy Based Management (SPBM) profile name.", + description=("storagePolicyName is the storage Policy Based Management (SPBM)" " profile name."), ), ] = None volume_path: Annotated[ str, - Field(alias="volumePath", description="Path that identifies vSphere volume vmdk"), + Field( + alias="volumePath", + description="volumePath is the path that identifies vSphere volume vmdk", + ), ] @@ -1213,7 +1328,10 @@ class VolumeMount(BaseModel): description=( "mountPropagation determines how mounts are propagated from the host to" " container and the other way around. When not set," - " MountPropagationNone is used. This field is beta in 1.10." + " MountPropagationNone is used. This field is beta in 1.10. When" + " RecursiveReadOnly is set to IfPossible or to Enabled," + " MountPropagation must be None or unspecified (which defaults to" + " None)." ), ), ] = None @@ -1227,6 +1345,26 @@ class VolumeMount(BaseModel): ), ), ] = None + recursive_read_only: Annotated[ + Optional[str], + Field( + alias="recursiveReadOnly", + description=( + "RecursiveReadOnly specifies whether read-only mounts should be handled" + " recursively.\n\nIf ReadOnly is false, this field has no meaning and" + " must be unspecified.\n\nIf ReadOnly is true, and this field is set to" + " Disabled, the mount is not made recursively read-only. If this field" + " is set to IfPossible, the mount is made recursively read-only, if it" + " is supported by the container runtime. If this field is set to" + " Enabled, the mount is made recursively read-only if it is supported" + " by the container runtime, otherwise the pod will not be started and" + " an error will be generated to indicate the reason.\n\nIf this field" + " is set to IfPossible or Enabled, MountPropagation must be set to None" + " (or be unspecified, which defaults to None).\n\nIf this field is not" + " specified, it is treated as an equivalent of Disabled." + ), + ), + ] = None sub_path: Annotated[ Optional[str], Field( @@ -1258,49 +1396,38 @@ class ImagePullPolicy(Enum): if_not_present = "IfNotPresent" -class TypeModel(Enum): - file_system_resize_pending = "FileSystemResizePending" - resizing = "Resizing" - - class PersistentVolumeClaimCondition(BaseModel): last_probe_time: Annotated[ Optional[v1.Time], - Field(alias="lastProbeTime", description="Last time we probed the condition."), + Field( + alias="lastProbeTime", + description="lastProbeTime is the time we probed the condition.", + ), ] = None last_transition_time: Annotated[ Optional[v1.Time], Field( alias="lastTransitionTime", - description=("Last time the condition transitioned from one status to another."), + description=("lastTransitionTime is the time the condition transitioned from one" " status to another."), ), ] = None message: Annotated[ Optional[str], - Field(description=("Human-readable message indicating details about last transition.")), + Field(description=("message is the human-readable message indicating details about last" " transition.")), ] = None reason: Annotated[ Optional[str], Field( description=( - "Unique, this should be a short, machine understandable string that" - " gives the reason for condition's last transition. If it reports" - ' "ResizeStarted" that means the underlying persistent volume is being' - " resized." + "reason is a unique, this should be a short, machine understandable" + " string that gives the reason for condition's last transition. If it" + ' reports "Resizing" that means the underlying persistent volume is' + " being resized." ) ), ] = None status: str - type: Annotated[ - TypeModel, - Field( - description=( - '\n\n\nPossible enum values:\n - `"FileSystemResizePending"` -' - " controller resize is finished and a file system resize is pending on" - ' node\n - `"Resizing"` - a user trigger resize of pvc has been started' - ) - ), - ] + type: str class ServicePort(BaseModel): @@ -1309,11 +1436,20 @@ class ServicePort(BaseModel): Field( alias="appProtocol", 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" + "The application protocol for this port. This is used as a hint for" + " implementations to offer richer behavior for protocols that they" + " understand. This field follows standard Kubernetes label syntax." + " Valid values are either:\n\n* Un-prefixed protocol names - reserved" + " for IANA standard service names (as per RFC-6335 and" + " https://www.iana.org/assignments/service-names).\n\n*" + " Kubernetes-defined prefixed names:\n * 'kubernetes.io/h2c' - HTTP/2" + " prior knowledge over cleartext as described in" + " https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-\n" + " * 'kubernetes.io/ws' - WebSocket over cleartext as described in" + " https://www.rfc-editor.org/rfc/rfc6455\n * 'kubernetes.io/wss' -" + " WebSocket over TLS as described in" + " https://www.rfc-editor.org/rfc/rfc6455\n\n* Other protocols should" + " use implementation-defined prefixed names such as" " mycompany.com/my-custom-protocol." ), ), @@ -1349,15 +1485,8 @@ class ServicePort(BaseModel): ] = None port: Annotated[int, Field(description="The port that will be exposed by this service.")] protocol: Annotated[ - Optional[Protocol], - Field( - description=( - 'The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".' - ' Default is TCP.\n\nPossible enum values:\n - `"SCTP"` is the SCTP' - ' protocol.\n - `"TCP"` is the TCP protocol.\n - `"UDP"` is the UDP' - " protocol." - ) - ), + Optional[str], + Field(description=('The IP protocol for this port. Supports "TCP", "UDP", and "SCTP".' " Default is TCP.")), ] = None target_port: Annotated[ Optional[intstr.IntOrString], @@ -1398,7 +1527,7 @@ class CSIVolumeSource(BaseModel): str, Field( description=( - "Driver is the name of the CSI driver that handles this volume. Consult" + "driver is the name of the CSI driver that handles this volume. Consult" " with your admin for the correct name as registered in the cluster." ) ), @@ -1408,9 +1537,9 @@ class CSIVolumeSource(BaseModel): Field( alias="fsType", description=( - 'Filesystem type to mount. Ex. "ext4", "xfs", "ntfs". If not provided,' - " the empty value is passed to the associated CSI driver which will" - " determine the default filesystem to apply." + 'fsType to mount. Ex. "ext4", "xfs", "ntfs". If not provided, the empty' + " value is passed to the associated CSI driver which will determine the" + " default filesystem to apply." ), ), ] = None @@ -1419,7 +1548,7 @@ class CSIVolumeSource(BaseModel): Field( alias="nodePublishSecretRef", description=( - "NodePublishSecretRef is a reference to the secret object containing" + "nodePublishSecretRef is a reference to the secret object containing" " sensitive information to pass to the CSI driver to complete the CSI" " NodePublishVolume and NodeUnpublishVolume calls. This field is" " optional, and may be empty if no secret is required. If the secret" @@ -1432,7 +1561,9 @@ class CSIVolumeSource(BaseModel): Optional[bool], Field( alias="readOnly", - description=("Specifies a read-only configuration for the volume. Defaults to false" " (read/write)."), + description=( + "readOnly specifies a read-only configuration for the volume. Defaults" " to false (read/write)." + ), ), ] = None volume_attributes: Annotated[ @@ -1440,7 +1571,7 @@ class CSIVolumeSource(BaseModel): Field( alias="volumeAttributes", description=( - "VolumeAttributes stores driver-specific properties that are passed to" + "volumeAttributes stores driver-specific properties that are passed to" " the CSI driver. Consult your driver's documentation for supported" " values." ), @@ -1453,22 +1584,24 @@ class CephFSVolumeSource(BaseModel): List[str], Field( description=( - "Required: Monitors is a collection of Ceph monitors More info:" - " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" + "monitors is Required: Monitors is a collection of Ceph monitors More" + " info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ) ), ] path: Annotated[ Optional[str], - Field(description=("Optional: Used as the mounted root, rather than the full Ceph tree," " default is /")), + Field( + description=("path is Optional: Used as the mounted root, rather than the full Ceph" " tree, default is /") + ), ] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" - " ReadOnly setting in VolumeMounts. More info:" + "readOnly is Optional: Defaults to false (read/write). ReadOnly here" + " will force the ReadOnly setting in VolumeMounts. More info:" " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ), ), @@ -1478,8 +1611,8 @@ class CephFSVolumeSource(BaseModel): Field( alias="secretFile", description=( - "Optional: SecretFile is the path to key ring for User, default is" - " /etc/ceph/user.secret More info:" + "secretFile is Optional: SecretFile is the path to key ring for User," + " default is /etc/ceph/user.secret More info:" " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ), ), @@ -1489,8 +1622,8 @@ class CephFSVolumeSource(BaseModel): Field( alias="secretRef", description=( - "Optional: SecretRef is reference to the authentication secret for" - " User, default is empty. More info:" + "secretRef is Optional: SecretRef is reference to the authentication" + " secret for User, default is empty. More info:" " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ), ), @@ -1499,8 +1632,8 @@ class CephFSVolumeSource(BaseModel): Optional[str], Field( description=( - "Optional: User is the rados user name, default is admin More info:" - " https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" + "user is optional: User is the rados user name, default is admin More" + " info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it" ) ), ] = None @@ -1512,9 +1645,9 @@ class CinderVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' - ' inferred to be "ext4" if unspecified. More info:' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Examples: "ext4", "xfs",' + ' "ntfs". Implicitly inferred to be "ext4" if unspecified. More info:' " https://examples.k8s.io/mysql-cinder-pd/README.md" ), ), @@ -1524,7 +1657,7 @@ class CinderVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" + "readOnly defaults to false (read/write). ReadOnly here will force the" " ReadOnly setting in VolumeMounts. More info:" " https://examples.k8s.io/mysql-cinder-pd/README.md" ), @@ -1534,7 +1667,10 @@ class CinderVolumeSource(BaseModel): Optional[LocalObjectReference], Field( alias="secretRef", - description=("Optional: points to a secret object containing parameters used to" " connect to OpenStack."), + description=( + "secretRef is optional: points to a secret object containing parameters" + " used to connect to OpenStack." + ), ), ] = None volume_id: Annotated[ @@ -1542,7 +1678,7 @@ class CinderVolumeSource(BaseModel): Field( alias="volumeID", description=( - "volume id used to identify the volume in cinder. More info:" + "volumeID used to identify the volume in cinder. More info:" " https://examples.k8s.io/mysql-cinder-pd/README.md" ), ), @@ -1552,30 +1688,30 @@ class CinderVolumeSource(BaseModel): class FlexVolumeSource(BaseModel): driver: Annotated[ str, - Field(description="Driver is the name of the driver to use for this volume."), + Field(description="driver is the name of the driver to use for this volume."), ] fs_type: Annotated[ Optional[str], Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". The default' - " filesystem depends on FlexVolume script." + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + " The default filesystem depends on FlexVolume script." ), ), ] = None options: Annotated[ Optional[Dict[str, str]], - Field(description="Optional: Extra command options if any."), + Field(description=("options is Optional: this field holds extra command options if any.")), ] = None read_only: Annotated[ Optional[bool], Field( alias="readOnly", description=( - "Optional: Defaults to false (read/write). ReadOnly here will force the" - " ReadOnly setting in VolumeMounts." + "readOnly is Optional: defaults to false (read/write). ReadOnly here" + " will force the ReadOnly setting in VolumeMounts." ), ), ] = None @@ -1584,10 +1720,11 @@ class FlexVolumeSource(BaseModel): Field( alias="secretRef", description=( - "Optional: SecretRef is reference to the secret object containing" - " sensitive information to pass to the plugin scripts. This may be" - " empty if no secret object is specified. If the secret object contains" - " more than one secret, all secrets are passed to the plugin scripts." + "secretRef is Optional: secretRef is reference to the secret object" + " containing sensitive information to pass to the plugin scripts. This" + " may be empty if no secret object is specified. If the secret object" + " contains more than one secret, all secrets are passed to the plugin" + " scripts." ), ), ] = None @@ -1598,14 +1735,14 @@ class ISCSIVolumeSource(BaseModel): Optional[bool], Field( alias="chapAuthDiscovery", - description="whether support iSCSI Discovery CHAP authentication", + description=("chapAuthDiscovery defines whether support iSCSI Discovery CHAP" " authentication"), ), ] = None chap_auth_session: Annotated[ Optional[bool], Field( alias="chapAuthSession", - description="whether support iSCSI Session CHAP authentication", + description=("chapAuthSession defines whether support iSCSI Session CHAP" " authentication"), ), ] = None fs_type: Annotated[ @@ -1613,10 +1750,10 @@ class ISCSIVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is the filesystem type of the volume that you want to mount." + " Tip: Ensure that the filesystem type is supported by the host" + ' operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' + ' inferred to be "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#iscsi" ), ), @@ -1626,27 +1763,30 @@ class ISCSIVolumeSource(BaseModel): Field( alias="initiatorName", description=( - "Custom iSCSI Initiator Name. If initiatorName is specified with" - " iscsiInterface simultaneously, new iSCSI interface : will be created for the connection." + "initiatorName is the custom iSCSI Initiator Name. If initiatorName is" + " specified with iscsiInterface simultaneously, new iSCSI interface" + " : will be created for the connection." ), ), ] = None - iqn: Annotated[str, Field(description="Target iSCSI Qualified Name.")] + iqn: Annotated[str, Field(description="iqn is the target iSCSI Qualified Name.")] iscsi_interface: Annotated[ Optional[str], Field( alias="iscsiInterface", - description=("iSCSI Interface Name that uses an iSCSI transport. Defaults to" " 'default' (tcp)."), + description=( + "iscsiInterface is the interface Name that uses an iSCSI transport." " Defaults to 'default' (tcp)." + ), ), ] = None - lun: Annotated[int, Field(description="iSCSI Target Lun number.")] + lun: Annotated[int, Field(description="lun represents iSCSI Target Lun number.")] portals: Annotated[ Optional[List[str]], Field( description=( - "iSCSI Target Portal List. The portal is either an IP or ip_addr:port" - " if the port is other than default (typically TCP ports 860 and 3260)." + "portals is the iSCSI Target Portal List. The portal is either an IP or" + " ip_addr:port if the port is other than default (typically TCP ports" + " 860 and 3260)." ) ), ] = None @@ -1654,14 +1794,14 @@ class ISCSIVolumeSource(BaseModel): Optional[bool], Field( alias="readOnly", - description=("ReadOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false."), + description=("readOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false."), ), ] = None secret_ref: Annotated[ Optional[LocalObjectReference], Field( alias="secretRef", - description="CHAP Secret for iSCSI target and initiator authentication", + description=("secretRef is the CHAP Secret for iSCSI target and initiator" " authentication"), ), ] = None target_portal: Annotated[ @@ -1669,8 +1809,9 @@ class ISCSIVolumeSource(BaseModel): Field( alias="targetPortal", description=( - "iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the" - " port is other than default (typically TCP ports 860 and 3260)." + "targetPortal is iSCSI Target Portal. The Portal is either an IP or" + " ip_addr:port if the port is other than default (typically TCP ports" + " 860 and 3260)." ), ), ] @@ -1682,10 +1823,10 @@ class RBDVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type of the volume that you want to mount. Tip: Ensure that" - " the filesystem type is supported by the host operating system." - ' Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if' - " unspecified. More info:" + "fsType is the filesystem type of the volume that you want to mount." + " Tip: Ensure that the filesystem type is supported by the host" + ' operating system. Examples: "ext4", "xfs", "ntfs". Implicitly' + ' inferred to be "ext4" if unspecified. More info:' " https://kubernetes.io/docs/concepts/storage/volumes#rbd" ), ), @@ -1694,7 +1835,8 @@ class RBDVolumeSource(BaseModel): str, Field( description=( - "The rados image name. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" + "image is the rados image name. More info:" + " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), ] @@ -1702,7 +1844,7 @@ class RBDVolumeSource(BaseModel): Optional[str], Field( description=( - "Keyring is the path to key ring for RBDUser. Default is" + "keyring is the path to key ring for RBDUser. Default is" " /etc/ceph/keyring. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) @@ -1712,7 +1854,7 @@ class RBDVolumeSource(BaseModel): List[str], Field( description=( - "A collection of Ceph monitors. More info:" + "monitors is a collection of Ceph monitors. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), @@ -1721,7 +1863,7 @@ class RBDVolumeSource(BaseModel): Optional[str], Field( description=( - "The rados pool name. Default is rbd. More info:" + "pool is the rados pool name. Default is rbd. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), @@ -1731,7 +1873,7 @@ class RBDVolumeSource(BaseModel): Field( alias="readOnly", description=( - "ReadOnly here will force the ReadOnly setting in VolumeMounts." + "readOnly here will force the ReadOnly setting in VolumeMounts." " Defaults to false. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ), @@ -1742,7 +1884,7 @@ class RBDVolumeSource(BaseModel): Field( alias="secretRef", description=( - "SecretRef is name of the authentication secret for RBDUser. If" + "secretRef is name of the authentication secret for RBDUser. If" " provided overrides keyring. Default is nil. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ), @@ -1752,7 +1894,7 @@ class RBDVolumeSource(BaseModel): Optional[str], Field( description=( - "The rados user name. Default is admin. More info:" + "user is the rados user name. Default is admin. More info:" " https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it" ) ), @@ -1765,17 +1907,23 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Default is "xfs".' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Default is "xfs".' ), ), ] = None - gateway: Annotated[str, Field(description="The host address of the ScaleIO API Gateway.")] + gateway: Annotated[ + str, + Field(description="gateway is the host address of the ScaleIO API Gateway."), + ] protection_domain: Annotated[ Optional[str], Field( alias="protectionDomain", - description=("The name of the ScaleIO Protection Domain for the configured storage."), + description=( + "protectionDomain is the name of the ScaleIO Protection Domain for the" " configured storage." + ), ), ] = None read_only: Annotated[ @@ -1783,7 +1931,8 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly Defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -1792,7 +1941,7 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="secretRef", description=( - "SecretRef references to the secret for ScaleIO user and other" + "secretRef references to the secret for ScaleIO user and other" " sensitive information. If this is not provided, Login operation will" " fail." ), @@ -1802,7 +1951,7 @@ class ScaleIOVolumeSource(BaseModel): Optional[bool], Field( alias="sslEnabled", - description=("Flag to enable/disable SSL communication with Gateway, default false"), + description=("sslEnabled Flag enable/disable SSL communication with Gateway, default" " false"), ), ] = None storage_mode: Annotated[ @@ -1810,8 +1959,8 @@ class ScaleIOVolumeSource(BaseModel): Field( alias="storageMode", description=( - "Indicates whether the storage for a volume should be ThickProvisioned" - " or ThinProvisioned. Default is ThinProvisioned." + "storageMode indicates whether the storage for a volume should be" + " ThickProvisioned or ThinProvisioned. Default is ThinProvisioned." ), ), ] = None @@ -1819,20 +1968,20 @@ class ScaleIOVolumeSource(BaseModel): Optional[str], Field( alias="storagePool", - description=("The ScaleIO Storage Pool associated with the protection domain."), + description=("storagePool is the ScaleIO Storage Pool associated with the protection" " domain."), ), ] = None system: Annotated[ str, - Field(description="The name of the storage system as configured in ScaleIO."), + Field(description=("system is the name of the storage system as configured in ScaleIO.")), ] volume_name: Annotated[ Optional[str], Field( alias="volumeName", description=( - "The name of a volume already created in the ScaleIO system that is" - " associated with this volume source." + "volumeName is the name of a volume already created in the ScaleIO" + " system that is associated with this volume source." ), ), ] = None @@ -1844,9 +1993,9 @@ class StorageOSVolumeSource(BaseModel): Field( alias="fsType", description=( - "Filesystem type to mount. Must be a filesystem type supported by the" - ' host operating system. Ex. "ext4", "xfs", "ntfs". Implicitly inferred' - ' to be "ext4" if unspecified.' + "fsType is the filesystem type to mount. Must be a filesystem type" + ' supported by the host operating system. Ex. "ext4", "xfs", "ntfs".' + ' Implicitly inferred to be "ext4" if unspecified.' ), ), ] = None @@ -1855,7 +2004,8 @@ class StorageOSVolumeSource(BaseModel): Field( alias="readOnly", description=( - "Defaults to false (read/write). ReadOnly here will force the ReadOnly" " setting in VolumeMounts." + "readOnly defaults to false (read/write). ReadOnly here will force the" + " ReadOnly setting in VolumeMounts." ), ), ] = None @@ -1864,7 +2014,7 @@ class StorageOSVolumeSource(BaseModel): Field( alias="secretRef", description=( - "SecretRef specifies the secret to use for obtaining the StorageOS API" + "secretRef specifies the secret to use for obtaining the StorageOS API" " credentials. If not specified, default values will be attempted." ), ), @@ -1874,7 +2024,7 @@ class StorageOSVolumeSource(BaseModel): Field( alias="volumeName", description=( - "VolumeName is the human-readable name of the StorageOS volume. Volume" + "volumeName is the human-readable name of the StorageOS volume. Volume" " names are only unique within a namespace." ), ), @@ -1884,7 +2034,7 @@ class StorageOSVolumeSource(BaseModel): Field( alias="volumeNamespace", description=( - "VolumeNamespace specifies the scope of the volume within StorageOS. " + "volumeNamespace specifies the scope of the volume within StorageOS. " " If no namespace is specified then the Pod's namespace will be used. " " This allows the Kubernetes name scoping to be mirrored within" " StorageOS for tighter integration. Set VolumeName to any name to" @@ -1901,9 +2051,9 @@ class EmptyDirVolumeSource(BaseModel): Optional[str], Field( description=( - "What type of storage medium should back this directory. The default is" - ' "" which means to use the node\'s default medium. Must be an empty' - " string (default) or Memory. More info:" + "medium represents what type of storage medium should back this" + ' directory. The default is "" which means to use the node\'s default' + " medium. Must be an empty string (default) or Memory. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#emptydir" ) ), @@ -1913,13 +2063,13 @@ class EmptyDirVolumeSource(BaseModel): Field( alias="sizeLimit", description=( - "Total amount of local storage required for this EmptyDir volume. The" - " size limit is also applicable for memory medium. The maximum usage on" - " memory medium EmptyDir would be the minimum value between the" - " SizeLimit specified here and the sum of memory limits of all" - " containers in a pod. The default is nil which means that the limit is" - " undefined. More info:" - " http://kubernetes.io/docs/user-guide/volumes#emptydir" + "sizeLimit is the total amount of local storage required for this" + " EmptyDir volume. The size limit is also applicable for memory medium." + " The maximum usage on memory medium EmptyDir would be the minimum" + " value between the SizeLimit specified here and the sum of memory" + " limits of all containers in a pod. The default is nil which means" + " that the limit is undefined. More info:" + " https://kubernetes.io/docs/concepts/storage/volumes#emptydir" ), ), ] = None @@ -1968,6 +2118,136 @@ class EventSeries(BaseModel): ] = None +class PersistentVolumeClaimStatus(BaseModel): + access_modes: Annotated[ + Optional[List[str]], + Field( + alias="accessModes", + description=( + "accessModes contains the actual access modes the volume backing the" + " PVC has. More info:" + " https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1" + ), + ), + ] = None + allocated_resource_statuses: Annotated[ + Optional[Dict[str, str]], + Field( + alias="allocatedResourceStatuses", + description=( + "allocatedResourceStatuses stores status of resource being resized for" + " the given PVC. Key names follow standard Kubernetes label syntax." + " Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the" + " capacity of the volume.\n\t* Custom resources must use" + " implementation-defined prefixed names such as" + ' "example.com/my-custom-resource"\nApart from above values - keys that' + " are unprefixed or have kubernetes.io prefix are considered reserved" + " and hence may not be used.\n\nClaimResourceStatus can be in any of" + " following states:\n\t- ControllerResizeInProgress:\n\t\tState set" + " when resize controller starts resizing the volume in" + " control-plane.\n\t- ControllerResizeFailed:\n\t\tState set when" + " resize has failed in resize controller with a terminal error.\n\t-" + " NodeResizePending:\n\t\tState set when resize controller has finished" + " resizing the volume but further resizing of\n\t\tvolume is needed on" + " the node.\n\t- NodeResizeInProgress:\n\t\tState set when kubelet" + " starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState set" + " when resizing has failed in kubelet with a terminal error. Transient" + " errors don't set\n\t\tNodeResizeFailed.\nFor example: if expanding a" + " PVC for more capacity - this field can be one of the following" + " states:\n\t- pvc.status.allocatedResourceStatus['storage'] =" + ' "ControllerResizeInProgress"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "ControllerResizeFailed"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "NodeResizePending"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "NodeResizeInProgress"\n -' + " pvc.status.allocatedResourceStatus['storage'] =" + ' "NodeResizeFailed"\nWhen this field is not set, it means that no' + " resize operation is in progress for the given PVC.\n\nA controller" + " that receives PVC update with previously unknown resourceName or" + " ClaimResourceStatus should ignore the update for the purpose it was" + " designed. For example - a controller that only is responsible for" + " resizing capacity of the volume, should ignore PVC updates that" + " change other valid resources associated with PVC.\n\nThis is an alpha" + " field and requires enabling RecoverVolumeExpansionFailure feature." + ), + ), + ] = None + allocated_resources: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field( + alias="allocatedResources", + description=( + "allocatedResources tracks the resources allocated to a PVC including" + " its capacity. Key names follow standard Kubernetes label syntax." + " Valid values are either:\n\t* Un-prefixed keys:\n\t\t- storage - the" + " capacity of the volume.\n\t* Custom resources must use" + " implementation-defined prefixed names such as" + ' "example.com/my-custom-resource"\nApart from above values - keys that' + " are unprefixed or have kubernetes.io prefix are considered reserved" + " and hence may not be used.\n\nCapacity reported here may be larger" + " than the actual capacity when a volume expansion operation is" + " requested. For storage quota, the larger value from" + " allocatedResources and PVC.spec.resources is used. If" + " allocatedResources is not set, PVC.spec.resources alone is used for" + " quota calculation. If a volume expansion capacity request is lowered," + " allocatedResources is only lowered if there are no expansion" + " operations in progress and if the actual volume capacity is equal or" + " lower than the requested capacity.\n\nA controller that receives PVC" + " update with previously unknown resourceName should ignore the update" + " for the purpose it was designed. For example - a controller that only" + " is responsible for resizing capacity of the volume, should ignore PVC" + " updates that change other valid resources associated with" + " PVC.\n\nThis is an alpha field and requires enabling" + " RecoverVolumeExpansionFailure feature." + ), + ), + ] = None + capacity: Annotated[ + Optional[Dict[str, resource.Quantity]], + Field(description=("capacity represents the actual resources of the underlying volume.")), + ] = None + conditions: Annotated[ + Optional[List[PersistentVolumeClaimCondition]], + Field( + description=( + "conditions is the current Condition of persistent volume claim. If" + " underlying persistent volume is being resized then the Condition will" + " be set to 'Resizing'." + ) + ), + ] = None + current_volume_attributes_class_name: Annotated[ + Optional[str], + Field( + alias="currentVolumeAttributesClassName", + description=( + "currentVolumeAttributesClassName is the current name of the" + " VolumeAttributesClass the PVC is using. When unset, there is no" + " VolumeAttributeClass applied to this PersistentVolumeClaim This is an" + " alpha field and requires enabling VolumeAttributesClass feature." + ), + ), + ] = None + modify_volume_status: Annotated[ + Optional[ModifyVolumeStatus], + Field( + alias="modifyVolumeStatus", + description=( + "ModifyVolumeStatus represents the status object of" + " ControllerModifyVolume operation. When this is unset, there is no" + " ModifyVolume operation being attempted. This is an alpha field and" + " requires enabling VolumeAttributesClass feature." + ), + ), + ] = None + phase: Annotated[ + Optional[str], + Field(description="phase represents the current phase of PersistentVolumeClaim."), + ] = None + + class PreferredSchedulingTerm(BaseModel): preference: Annotated[ NodeSelectorTerm, @@ -1982,6 +2262,17 @@ class PreferredSchedulingTerm(BaseModel): class PodSecurityContext(BaseModel): + app_armor_profile: Annotated[ + Optional[AppArmorProfile], + Field( + alias="appArmorProfile", + description=( + "appArmorProfile is the AppArmor options to use by the containers in" + " this pod. Note that this field cannot be set when spec.os.name is" + " windows." + ), + ), + ] = None fs_group: Annotated[ Optional[int], Field( @@ -2086,9 +2377,13 @@ class PodSecurityContext(BaseModel): alias="supplementalGroups", description=( "A list of groups applied to the first process run in each container," - " in addition to the container's primary GID. If unspecified, no" - " groups will be added to any container. Note that this field cannot be" - " set when spec.os.name is windows." + " in addition to the container's primary GID, the fsGroup (if" + " specified), and group memberships defined in the container image for" + " the uid of the container process. If unspecified, no additional" + " groups are added to any container. Note that group memberships" + " defined in the container image for the uid of the container process" + " are still effective, even if they are not included in this list. Note" + " that this field cannot be set when spec.os.name is windows." ), ), ] = None @@ -2132,6 +2427,17 @@ class SecurityContext(BaseModel): ), ), ] = None + app_armor_profile: Annotated[ + Optional[AppArmorProfile], + Field( + alias="appArmorProfile", + description=( + "appArmorProfile is the AppArmor options to use by this container. If" + " set, this profile overrides the pod's appArmorProfile. Note that this" + " field cannot be set when spec.os.name is windows." + ), + ), + ] = None capabilities: Annotated[ Optional[Capabilities], Field( @@ -2265,7 +2571,8 @@ class DownwardAPIVolumeFile(BaseModel): Field( alias="fieldRef", description=( - "Required: Selects a field of the pod: only annotations, labels, name" " and namespace are supported." + "Required: Selects a field of the pod: only annotations, labels, name," + " namespace and uid are supported." ), ), ] = None @@ -2373,12 +2680,18 @@ class EnvVar(BaseModel): ] = None -class TerminationMessagePolicy(Enum): - fallback_to_logs_on_error = "FallbackToLogsOnError" - file = "File" - - class ResourceRequirements(BaseModel): + claims: Annotated[ + Optional[List[ResourceClaim]], + Field( + description=( + "Claims lists the names of resources, defined in spec.resourceClaims," + " that are used by this container.\n\nThis is an alpha field and" + " requires enabling the DynamicResourceAllocation feature gate.\n\nThis" + " field is immutable. It can only be set for containers." + ) + ), + ] = None limits: Annotated[ Optional[Dict[str, resource.Quantity]], Field( @@ -2396,7 +2709,7 @@ class ResourceRequirements(BaseModel): "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:" + " value. Requests cannot exceed Limits. More info:" " https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/" ) ), @@ -2442,7 +2755,7 @@ class ConfigMapProjection(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items if unspecified, each key-value pair in the Data field of the" " referenced ConfigMap will be projected into the volume as a file" " whose name is the key and content is the value. If specified, the" " listed keys will be projected into the specified paths, and unlisted" @@ -2457,14 +2770,16 @@ class ConfigMapProjection(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the ConfigMap or its keys must be defined"), + Field(description=("optional specify whether the ConfigMap or its keys must be defined")), ] = None @@ -2474,10 +2789,10 @@ class ConfigMapVolumeSource(BaseModel): Field( alias="defaultMode", description=( - "Optional: mode bits used to set permissions on created files by" - " default. Must be an octal value between 0000 and 0777 or a decimal" - " value between 0 and 511. YAML accepts both octal and decimal values," - " JSON requires decimal values for mode bits. Defaults to 0644." + "defaultMode is optional: mode bits used to set permissions on created" + " files by default. Must be an octal value between 0000 and 0777 or a" + " decimal value between 0 and 511. YAML accepts both octal and decimal" + " values, JSON requires decimal values for mode bits. Defaults to 0644." " Directories within the path are not affected by this setting. This" " might be in conflict with other options that affect the file mode," " like fsGroup, and the result can be other mode bits set." @@ -2488,7 +2803,7 @@ class ConfigMapVolumeSource(BaseModel): Optional[List[KeyToPath]], Field( description=( - "If unspecified, each key-value pair in the Data field of the" + "items if unspecified, each key-value pair in the Data field of the" " referenced ConfigMap will be projected into the volume as a file" " whose name is the key and content is the value. If specified, the" " listed keys will be projected into the specified paths, and unlisted" @@ -2503,14 +2818,16 @@ class ConfigMapVolumeSource(BaseModel): Optional[str], Field( description=( - "Name of the referent. More info:" + "Name of the referent. This field is effectively required, but due to" + " backwards compatibility is allowed to be empty. Instances of this" + " type with an empty value here are almost certainly wrong. More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), ] = None optional: Annotated[ Optional[bool], - Field(description="Specify whether the ConfigMap or its keys must be defined"), + Field(description=("optional specify whether the ConfigMap or its keys must be defined")), ] = None @@ -2572,15 +2889,8 @@ class HTTPGetAction(BaseModel): ), ] scheme: Annotated[ - Optional[Scheme], - Field( - description=( - "Scheme to use for connecting to the host. Defaults to" - ' HTTP.\n\nPossible enum values:\n - `"HTTP"` means that the scheme' - ' used will be http://\n - `"HTTPS"` means that the scheme used will be' - " https://" - ) - ), + Optional[str], + Field(description="Scheme to use for connecting to the host. Defaults to HTTP."), ] = None @@ -2594,73 +2904,52 @@ class NodeSelector(BaseModel): ] -class PersistentVolumeClaimStatus(BaseModel): - access_modes: Annotated[ - Optional[List[str]], - Field( - alias="accessModes", - description=( - "AccessModes contains the actual access modes the volume backing the" - " PVC has. More info:" - " https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1" - ), - ), - ] = None - allocated_resources: Annotated[ - Optional[Dict[str, resource.Quantity]], +class ClusterTrustBundleProjection(BaseModel): + label_selector: Annotated[ + Optional[v1.LabelSelector], Field( - alias="allocatedResources", + alias="labelSelector", description=( - "The storage resource within AllocatedResources tracks the capacity" - " allocated to a PVC. It may be larger than the actual capacity when a" - " volume expansion operation is requested. For storage quota, the" - " larger value from allocatedResources and PVC.spec.resources is used." - " If allocatedResources is not set, PVC.spec.resources alone is used" - " for quota calculation. If a volume expansion capacity request is" - " lowered, allocatedResources is only lowered if there are no expansion" - " operations in progress and if the actual volume capacity is equal or" - " lower than the requested capacity. This is an alpha field and" - " requires enabling RecoverVolumeExpansionFailure feature." + "Select all ClusterTrustBundles that match this label selector. Only" + " has effect if signerName is set. Mutually-exclusive with name. If" + ' unset, interpreted as "match nothing". If set but empty, interpreted' + ' as "match everything".' ), ), ] = None - capacity: Annotated[ - Optional[Dict[str, resource.Quantity]], - Field(description="Represents the actual resources of the underlying volume."), - ] = None - conditions: Annotated[ - Optional[List[PersistentVolumeClaimCondition]], + name: Annotated[ + Optional[str], Field( description=( - "Current Condition of persistent volume claim. If underlying persistent" - " volume is being resized then the Condition will be set to" - " 'ResizeStarted'." + "Select a single ClusterTrustBundle by object name. Mutually-exclusive" + " with signerName and labelSelector." ) ), ] = None - phase: Annotated[ - Optional[Phase], + optional: Annotated[ + Optional[bool], Field( description=( - "Phase represents the current phase of" - ' PersistentVolumeClaim.\n\nPossible enum values:\n - `"Bound"` used' - ' for PersistentVolumeClaims that are bound\n - `"Lost"` used for' - " PersistentVolumeClaims that lost their underlying PersistentVolume." - " The claim was bound to a PersistentVolume and this volume does not" - ' exist any longer and all data on it was lost.\n - `"Pending"` used' - " for PersistentVolumeClaims that are not yet bound" + "If true, don't block pod startup if the referenced" + " ClusterTrustBundle(s) aren't available. If using name, then the" + " named ClusterTrustBundle is allowed not to exist. If using" + " signerName, then the combination of signerName and labelSelector is" + " allowed to match zero ClusterTrustBundles." ) ), ] = None - resize_status: Annotated[ + path: Annotated[ + str, + Field(description="Relative path from the volume root to write the bundle."), + ] + signer_name: Annotated[ Optional[str], Field( - alias="resizeStatus", + alias="signerName", description=( - "ResizeStatus stores status of resize operation. ResizeStatus is not" - " set by default but when expansion is complete resizeStatus is set to" - " empty string by resize controller or kubelet. This is an alpha field" - " and requires enabling RecoverVolumeExpansionFailure feature." + "Select all ClusterTrustBundles that match this signer name." + " Mutually-exclusive with name. The contents of all selected" + " ClusterTrustBundles will be unified and deduplicated." ), ), ] = None @@ -2671,7 +2960,48 @@ class PodAffinityTerm(BaseModel): Optional[v1.LabelSelector], Field( alias="labelSelector", - description="A label query over a set of resources, in this case pods.", + description=( + "A label query over a set of resources, in this case pods. If it's" + " null, this PodAffinityTerm matches with no Pods." + ), + ), + ] = None + match_label_keys: Annotated[ + Optional[List[str]], + Field( + alias="matchLabelKeys", + description=( + "MatchLabelKeys is a set of pod label keys to select which pods will be" + " taken into consideration. The keys are used to lookup values from the" + " incoming pod labels, those key-value labels are merged with" + " `labelSelector` as `key in (value)` to select the group of existing" + " pods which pods will be taken into consideration for the incoming" + " pod's pod (anti) affinity. Keys that don't exist in the incoming pod" + " labels will be ignored. The default value is empty. The same key is" + " forbidden to exist in both matchLabelKeys and labelSelector. Also," + " matchLabelKeys cannot be set when labelSelector isn't set. This is an" + " alpha field and requires enabling MatchLabelKeysInPodAffinity feature" + " gate." + ), + ), + ] = None + mismatch_label_keys: Annotated[ + Optional[List[str]], + Field( + alias="mismatchLabelKeys", + description=( + "MismatchLabelKeys is a set of pod label keys to select which pods will" + " be taken into consideration. The keys are used to lookup values from" + " the incoming pod labels, those key-value labels are merged with" + " `labelSelector` as `key notin (value)` to select the group of" + " existing pods which pods will be taken into consideration for the" + " incoming pod's pod (anti) affinity. Keys that don't exist in the" + " incoming pod labels will be ignored. The default value is empty. The" + " same key is forbidden to exist in both mismatchLabelKeys and" + " labelSelector. Also, mismatchLabelKeys cannot be set when" + " labelSelector isn't set. This is an alpha field and requires enabling" + " MatchLabelKeysInPodAffinity feature gate." + ), ), ] = None namespace_selector: Annotated[ @@ -2683,8 +3013,7 @@ class PodAffinityTerm(BaseModel): " 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 beta-level and is" - " only honored when PodAffinityNamespaceSelector feature is enabled." + " selector ({}) matches all namespaces." ), ), ] = None @@ -2696,7 +3025,7 @@ class PodAffinityTerm(BaseModel): " 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"' + ' namespace".' ) ), ] = None @@ -2756,7 +3085,7 @@ class PersistentVolumeClaimSpec(BaseModel): Field( alias="accessModes", description=( - "AccessModes contains the desired access modes the volume should have." + "accessModes contains the desired access modes the volume should have." " More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1" ), @@ -2767,47 +3096,56 @@ class PersistentVolumeClaimSpec(BaseModel): Field( alias="dataSource", description=( - "This field can be used to specify either: * An existing VolumeSnapshot" - " object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC" - " (PersistentVolumeClaim) If the provisioner or an external controller" - " can support the specified data source, it will create a new volume" - " based on the contents of the specified data source. If the" - " AnyVolumeDataSource feature gate is enabled, this field will always" - " have the same contents as the DataSourceRef field." + "dataSource field can be used to specify either: * An existing" + " VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An" + " existing PVC (PersistentVolumeClaim) If the provisioner or an" + " external controller can support the specified data source, it will" + " create a new volume based on the contents of the specified data" + " source. When the AnyVolumeDataSource feature gate is enabled," + " dataSource contents will be copied to dataSourceRef, and" + " dataSourceRef contents will be copied to dataSource when" + " dataSourceRef.namespace is not specified. If the namespace is" + " specified, then dataSourceRef will not be copied to dataSource." ), ), ] = None data_source_ref: Annotated[ - Optional[TypedLocalObjectReference], + Optional[TypedObjectReference], Field( alias="dataSourceRef", description=( - "Specifies the object from which to populate the volume with data, if a" - " non-empty volume is desired. This may be any local object from a" - " non-empty API group (non core object) or a PersistentVolumeClaim" - " object. When this field is specified, volume binding will only" - " succeed if the type of the specified object matches some installed" - " volume populator or dynamic provisioner. This field will replace the" - " functionality of the DataSource field and as such if both fields are" - " non-empty, they must have the same value. For backwards" - " compatibility, both fields (DataSource and DataSourceRef) will be set" + "dataSourceRef specifies the object from which to populate the volume" + " with data, if a non-empty volume is desired. This may be any object" + " from a non-empty API group (non core object) or a" + " PersistentVolumeClaim object. When this field is specified, volume" + " binding will only succeed if the type of the specified object matches" + " some installed volume populator or dynamic provisioner. This field" + " will replace the functionality of the dataSource field and as such if" + " both fields are non-empty, they must have the same value. For" + " backwards compatibility, when namespace isn't specified in" + " dataSourceRef, both fields (dataSource and dataSourceRef) will be set" " to the same value automatically if one of them is empty and the other" - " is non-empty. There are two important differences between DataSource" - " and DataSourceRef: * While DataSource only allows two specific types" - " of objects, DataSourceRef\n allows any non-core object, as well as" - " PersistentVolumeClaim objects.\n* While DataSource ignores disallowed" - " values (dropping them), DataSourceRef\n preserves all values, and" - " generates an error if a disallowed value is\n specified.\n(Alpha)" - " Using this field requires the AnyVolumeDataSource feature gate to be" - " enabled." + " is non-empty. When namespace is specified in dataSourceRef," + " dataSource isn't set to the same value and must be empty. There are" + " three important differences between dataSource and dataSourceRef: *" + " While dataSource only allows two specific types of objects," + " dataSourceRef\n allows any non-core object, as well as" + " PersistentVolumeClaim objects.\n* While dataSource ignores disallowed" + " values (dropping them), dataSourceRef\n preserves all values, and" + " generates an error if a disallowed value is\n specified.\n* While" + " dataSource only allows local objects, dataSourceRef allows objects\n " + " in any namespaces.\n(Beta) Using this field requires the" + " AnyVolumeDataSource feature gate to be enabled. (Alpha) Using the" + " namespace field of dataSourceRef requires the" + " CrossNamespaceVolumeDataSource feature gate to be enabled." ), ), ] = None resources: Annotated[ - Optional[ResourceRequirements], + Optional[VolumeResourceRequirements], Field( description=( - "Resources represents the minimum resources the volume should have. If" + "resources represents the minimum resources the volume should have. If" " RecoverVolumeExpansionFailure feature is enabled users are allowed to" " specify resource requirements that are lower than previous value but" " must still be higher than capacity recorded in the status field of" @@ -2818,18 +3156,44 @@ class PersistentVolumeClaimSpec(BaseModel): ] = None selector: Annotated[ Optional[v1.LabelSelector], - Field(description="A label query over volumes to consider for binding."), + Field(description=("selector is a label query over volumes to consider for binding.")), ] = None storage_class_name: Annotated[ Optional[str], Field( alias="storageClassName", description=( - "Name of the StorageClass required by the claim. More info:" + "storageClassName is the name of the StorageClass required by the" + " claim. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1" ), ), ] = None + volume_attributes_class_name: Annotated[ + Optional[str], + Field( + alias="volumeAttributesClassName", + description=( + "volumeAttributesClassName may be used to set the VolumeAttributesClass" + " used by this claim. If specified, the CSI driver will create or" + " update the volume with the attributes defined in the corresponding" + " VolumeAttributesClass. This has a different purpose than" + " storageClassName, it can be changed after the claim is created. An" + " empty string value means that no VolumeAttributesClass will be" + " applied to the claim but it's not allowed to reset this field to" + " empty string once it is set. If unspecified and the" + " PersistentVolumeClaim is unbound, the default VolumeAttributesClass" + " will be set by the persistentvolume controller if it exists. If the" + " resource referred to by volumeAttributesClass does not exist, this" + " PersistentVolumeClaim will be set to a Pending state, as reflected by" + " the modifyVolumeStatus field, until such as a resource exists. More" + " info:" + " https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/" + " (Alpha) Using this field requires the VolumeAttributesClass feature" + " gate to be enabled." + ), + ), + ] = None volume_mode: Annotated[ Optional[str], Field( @@ -2844,35 +3208,7 @@ class PersistentVolumeClaimSpec(BaseModel): Optional[str], Field( alias="volumeName", - description=("VolumeName is the binding reference to the PersistentVolume backing" " this claim."), - ), - ] = None - - -class VolumeProjection(BaseModel): - config_map: Annotated[ - Optional[ConfigMapProjection], - Field( - alias="configMap", - description="information about the configMap data to project", - ), - ] = None - downward_api: Annotated[ - Optional[DownwardAPIProjection], - Field( - alias="downwardAPI", - description="information about the downwardAPI data to project", - ), - ] = None - secret: Annotated[ - Optional[SecretProjection], - Field(description="information about the secret data to project"), - ] = None - service_account_token: Annotated[ - Optional[ServiceAccountTokenProjection], - Field( - alias="serviceAccountToken", - description="information about the serviceAccountToken data to project", + description=("volumeName is the binding reference to the PersistentVolume backing" " this claim."), ), ] = None @@ -2886,6 +3222,12 @@ class LifecycleHandler(BaseModel): description="HTTPGet specifies the http request to perform.", ), ] = None + sleep: Annotated[ + Optional[SleepAction], + Field( + description=("Sleep represents the duration that the container should sleep before" " being terminated.") + ), + ] = None tcp_socket: Annotated[ Optional[TCPSocketAction], Field( @@ -2914,12 +3256,7 @@ class Probe(BaseModel): ] = None grpc: Annotated[ Optional[GRPCAction], - Field( - description=( - "GRPC specifies an action involving a GRPC port. This is an alpha field" - " and requires enabling GRPCContainerProbe feature gate." - ) - ), + Field(description="GRPC specifies an action involving a GRPC port."), ] = None http_get: Annotated[ Optional[HTTPGetAction], @@ -2998,6 +3335,52 @@ class Probe(BaseModel): ] = None +class VolumeProjection(BaseModel): + cluster_trust_bundle: Annotated[ + Optional[ClusterTrustBundleProjection], + Field( + alias="clusterTrustBundle", + description=( + "ClusterTrustBundle allows a pod to access the `.spec.trustBundle`" + " field of ClusterTrustBundle objects in an auto-updating" + " file.\n\nAlpha, gated by the ClusterTrustBundleProjection feature" + " gate.\n\nClusterTrustBundle objects can either be selected by name," + " or by the combination of signer name and a label selector.\n\nKubelet" + " performs aggressive normalization of the PEM contents written into" + " the pod filesystem. Esoteric PEM features such as inter-block" + " comments and block headers are stripped. Certificates are" + " deduplicated. The ordering of certificates within the file is" + " arbitrary, and Kubelet may change the order over time." + ), + ), + ] = None + config_map: Annotated[ + Optional[ConfigMapProjection], + Field( + alias="configMap", + description="configMap information about the configMap data to project", + ), + ] = None + downward_api: Annotated[ + Optional[DownwardAPIProjection], + Field( + alias="downwardAPI", + description="downwardAPI information about the downwardAPI data to project", + ), + ] = None + secret: Annotated[ + Optional[SecretProjection], + Field(description="secret information about the secret data to project"), + ] = None + service_account_token: Annotated[ + Optional[ServiceAccountTokenProjection], + Field( + alias="serviceAccountToken", + description=("serviceAccountToken is information about the serviceAccountToken data" " to project"), + ), + ] = None + + class WeightedPodAffinityTerm(BaseModel): pod_affinity_term: Annotated[ PodAffinityTerm, @@ -3158,7 +3541,7 @@ class PersistentVolumeClaim(BaseModel): Optional[PersistentVolumeClaimSpec], Field( description=( - "Spec defines the desired characteristics of a volume requested by a" + "spec defines the desired characteristics of a volume requested by a" " pod author. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ) @@ -3168,7 +3551,7 @@ class PersistentVolumeClaim(BaseModel): Optional[PersistentVolumeClaimStatus], Field( description=( - "Status represents the current information/status of a persistent" + "status represents the current information/status of a persistent" " volume claim. Read-only. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ) @@ -3266,10 +3649,10 @@ class Container(BaseModel): Optional[List[str]], Field( description=( - "Arguments to the entrypoint. The docker image's CMD is used if this" - " is not provided. Variable references $(VAR_NAME) are expanded using" - " the container's environment. If a variable cannot be resolved, the" - " reference in the input string will be unchanged. Double $$ are" + "Arguments to the entrypoint. The container image's CMD is used if" + " this is not provided. Variable references $(VAR_NAME) are expanded" + " using the container's environment. If a variable cannot be resolved," + " the reference in the input string will be unchanged. Double $$ are" " reduced to a single $, which allows for escaping the $(VAR_NAME)" ' syntax: i.e. "$$(VAR_NAME)" will produce the string literal' ' "$(VAR_NAME)". Escaped references will never be expanded, regardless' @@ -3282,7 +3665,7 @@ class Container(BaseModel): Optional[List[str]], Field( description=( - "Entrypoint array. Not executed within a shell. The docker image's" + "Entrypoint array. Not executed within a shell. The container image's" " ENTRYPOINT is used if this is not provided. Variable references" " $(VAR_NAME) are expanded using the container's environment. If a" " variable cannot be resolved, the reference in the input string will" @@ -3317,7 +3700,7 @@ class Container(BaseModel): str, Field( description=( - "Docker image name. More info:" + "Container image name. More info:" " https://kubernetes.io/docs/concepts/containers/images This field is" " optional to allow higher level config management to default or" " override container images in workload controllers like Deployments" @@ -3333,14 +3716,7 @@ class Container(BaseModel): "Image pull policy. One of Always, Never, IfNotPresent. Defaults to" " Always if :latest tag is specified, or IfNotPresent otherwise. Cannot" " be updated. More info:" - " https://kubernetes.io/docs/concepts/containers/images#updating-images\n\nPossible" - ' enum values:\n - `"Always"` means that kubelet always attempts to' - " pull the latest image. Container will fail If the pull fails.\n -" - ' `"IfNotPresent"` means that kubelet pulls if the image isn\'t present' - " on disk. Container will fail if the image isn't present and the pull" - ' fails.\n - `"Never"` means that kubelet never pulls an image, but' - " only uses a local image. Container will fail if the image isn't" - " present" + " https://kubernetes.io/docs/concepts/containers/images#updating-images" ), ), ] = None @@ -3377,12 +3753,13 @@ class Container(BaseModel): Optional[List[ContainerPort]], Field( description=( - "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" + "List of ports to expose from the container. 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." + " accessible from the network. Modifying this array with strategic" + " merge patch may corrupt the data. For more information See" + " https://github.com/kubernetes/kubernetes/issues/108255. Cannot be" + " updated." ) ), ] = None @@ -3398,6 +3775,13 @@ class Container(BaseModel): ), ), ] = None + resize_policy: Annotated[ + Optional[List[ContainerResizePolicy]], + Field( + alias="resizePolicy", + description="Resources resize policy for the container.", + ), + ] = None resources: Annotated[ Optional[ResourceRequirements], Field( @@ -3408,6 +3792,30 @@ class Container(BaseModel): ) ), ] = None + restart_policy: Annotated[ + Optional[str], + Field( + alias="restartPolicy", + description=( + "RestartPolicy defines the restart behavior of individual containers in" + " a pod. This field may only be set for init containers, and the only" + ' allowed value is "Always". For non-init containers or when this field' + " is not specified, the restart behavior is defined by the Pod's" + " restart policy and the container type. Setting the RestartPolicy as" + ' "Always" for the init container will have the following effect: this' + " init container will be continually restarted on exit until all" + " regular containers have terminated. Once all regular containers have" + ' completed, all init containers with restartPolicy "Always" will be' + " shut down. This lifecycle differs from normal init containers and is" + ' often referred to as a "sidecar" container. Although this init' + " container still starts in the init container sequence, it does not" + " wait for the container to complete before proceeding to the next init" + " container. Instead, the next init container starts immediately after" + " this init container is started, or after any startupProbe has" + " successfully completed." + ), + ), + ] = None security_context: Annotated[ Optional[SecurityContext], Field( @@ -3479,7 +3887,7 @@ class Container(BaseModel): ), ] = None termination_message_policy: Annotated[ - Optional[TerminationMessagePolicy], + Optional[str], Field( alias="terminationMessagePolicy", description=( @@ -3489,13 +3897,7 @@ class Container(BaseModel): " will use the last chunk of container log output if the termination" " message file is empty and the container exited with an error. The log" " output is limited to 2048 bytes or 80 lines, whichever is smaller." - " Defaults to File. Cannot be updated.\n\nPossible enum values:\n -" - ' `"FallbackToLogsOnError"` will read the most recent contents of the' - " container logs for the container status message when the container" - " exits with an error and the terminationMessagePath has no contents.\n" - ' - `"File"` is the default behavior and will set the container status' - " message to the contents of the container's terminationMessagePath" - " when the container exits." + " Defaults to File. Cannot be updated." ), ), ] = None @@ -3615,19 +4017,19 @@ class ProjectedVolumeSource(BaseModel): Field( alias="defaultMode", description=( - "Mode bits used to set permissions on created files by default. Must be" - " an octal value between 0000 and 0777 or a decimal value between 0 and" - " 511. YAML accepts both octal and decimal values, JSON requires" - " decimal values for mode bits. Directories within the path are not" - " affected by this setting. This might be in conflict with other" - " options that affect the file mode, like fsGroup, and the result can" - " be other mode bits set." + "defaultMode are the mode bits used to set permissions on created files" + " by default. Must be an octal value between 0000 and 0777 or a decimal" + " value between 0 and 511. YAML accepts both octal and decimal values," + " JSON requires decimal values for mode bits. Directories within the" + " path are not affected by this setting. This might be in conflict with" + " other options that affect the file mode, like fsGroup, and the result" + " can be other mode bits set." ), ), ] = None sources: Annotated[ Optional[List[VolumeProjection]], - Field(description="list of volume projections"), + Field(description="sources is the list of volume projections"), ] = None @@ -3667,7 +4069,7 @@ class Volume(BaseModel): Field( alias="awsElasticBlockStore", description=( - "AWSElasticBlockStore represents an AWS Disk resource that is attached" + "awsElasticBlockStore represents an AWS Disk resource that is attached" " to a kubelet's host machine and then exposed to the pod. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore" ), @@ -3677,25 +4079,25 @@ class Volume(BaseModel): Optional[AzureDiskVolumeSource], Field( alias="azureDisk", - description=("AzureDisk represents an Azure Data Disk mount on the host and bind" " mount to the pod."), + description=("azureDisk represents an Azure Data Disk mount on the host and bind" " mount to the pod."), ), ] = None azure_file: Annotated[ Optional[AzureFileVolumeSource], Field( alias="azureFile", - description=("AzureFile represents an Azure File Service mount on the host and bind" " mount to the pod."), + description=("azureFile represents an Azure File Service mount on the host and bind" " mount to the pod."), ), ] = None cephfs: Annotated[ Optional[CephFSVolumeSource], - Field(description=("CephFS represents a Ceph FS mount on the host that shares a pod's" " lifetime")), + Field(description=("cephFS represents a Ceph FS mount on the host that shares a pod's" " lifetime")), ] = None cinder: Annotated[ Optional[CinderVolumeSource], Field( description=( - "Cinder represents a cinder volume attached and mounted on kubelets" + "cinder represents a cinder volume attached and mounted on kubelets" " host machine. More info:" " https://examples.k8s.io/mysql-cinder-pd/README.md" ) @@ -3705,14 +4107,14 @@ class Volume(BaseModel): Optional[ConfigMapVolumeSource], Field( alias="configMap", - description=("ConfigMap represents a configMap that should populate this volume"), + description=("configMap represents a configMap that should populate this volume"), ), ] = None csi: Annotated[ Optional[CSIVolumeSource], Field( description=( - "CSI (Container Storage Interface) represents ephemeral storage that is" + "csi (Container Storage Interface) represents ephemeral storage that is" " handled by certain external CSI drivers (Beta feature)." ) ), @@ -3721,7 +4123,7 @@ class Volume(BaseModel): Optional[DownwardAPIVolumeSource], Field( alias="downwardAPI", - description=("DownwardAPI represents downward API about the pod that should populate" " this volume"), + description=("downwardAPI represents downward API about the pod that should populate" " this volume"), ), ] = None empty_dir: Annotated[ @@ -3729,7 +4131,7 @@ class Volume(BaseModel): Field( alias="emptyDir", description=( - "EmptyDir represents a temporary directory that shares a pod's" + "emptyDir represents a temporary directory that shares a pod's" " lifetime. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#emptydir" ), @@ -3739,7 +4141,7 @@ class Volume(BaseModel): Optional[EphemeralVolumeSource], Field( description=( - "Ephemeral represents a volume that is handled by a cluster storage" + "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" @@ -3762,7 +4164,7 @@ class Volume(BaseModel): Optional[FCVolumeSource], Field( description=( - "FC represents a Fibre Channel resource that is attached to a kubelet's" + "fc represents a Fibre Channel resource that is attached to a kubelet's" " host machine and then exposed to the pod." ) ), @@ -3772,7 +4174,7 @@ class Volume(BaseModel): Field( alias="flexVolume", description=( - "FlexVolume represents a generic volume resource that is" + "flexVolume represents a generic volume resource that is" " provisioned/attached using an exec based plugin." ), ), @@ -3781,7 +4183,7 @@ class Volume(BaseModel): Optional[FlockerVolumeSource], Field( description=( - "Flocker represents a Flocker volume attached to a kubelet's host" + "flocker represents a Flocker volume attached to a kubelet's host" " machine. This depends on the Flocker control service being running" ) ), @@ -3791,7 +4193,7 @@ class Volume(BaseModel): Field( alias="gcePersistentDisk", description=( - "GCEPersistentDisk represents a GCE Disk resource that is attached to a" + "gcePersistentDisk represents a GCE Disk resource that is attached to a" " kubelet's host machine and then exposed to the pod. More info:" " https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk" ), @@ -3802,7 +4204,7 @@ class Volume(BaseModel): Field( alias="gitRepo", description=( - "GitRepo represents a git repository at a particular revision." + "gitRepo represents a git repository at a particular revision." " DEPRECATED: GitRepo is deprecated. To provision a container with a" " git repo, mount an EmptyDir into an InitContainer that clones the" " repo using git, then mount the EmptyDir into the Pod's container." @@ -3813,7 +4215,7 @@ class Volume(BaseModel): Optional[GlusterfsVolumeSource], Field( description=( - "Glusterfs represents a Glusterfs mount on the host that shares a pod's" + "glusterfs represents a Glusterfs mount on the host that shares a pod's" " lifetime. More info:" " https://examples.k8s.io/volumes/glusterfs/README.md" ) @@ -3824,7 +4226,7 @@ class Volume(BaseModel): Field( alias="hostPath", description=( - "HostPath represents a pre-existing file or directory on the host" + "hostPath represents a pre-existing file or directory on the host" " machine that is directly exposed to the container. This is generally" " used for system agents or other privileged things that are allowed to" " see the host machine. Most containers will NOT need this. More info:" @@ -3836,7 +4238,7 @@ class Volume(BaseModel): Optional[ISCSIVolumeSource], Field( description=( - "ISCSI represents an ISCSI Disk resource that is attached to a" + "iscsi represents an ISCSI Disk resource that is attached to a" " kubelet's host machine and then exposed to the pod. More info:" " https://examples.k8s.io/volumes/iscsi/README.md" ) @@ -3846,8 +4248,8 @@ class Volume(BaseModel): str, Field( description=( - "Volume's name. Must be a DNS_LABEL and unique within the pod. More" - " info:" + "name of the volume. Must be a DNS_LABEL and unique within the pod." + " More info:" " https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" ) ), @@ -3856,7 +4258,7 @@ class Volume(BaseModel): Optional[NFSVolumeSource], Field( description=( - "NFS represents an NFS mount on the host that shares a pod's lifetime" + "nfs represents an NFS mount on the host that shares a pod's lifetime" " More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs" ) ), @@ -3866,7 +4268,7 @@ class Volume(BaseModel): Field( alias="persistentVolumeClaim", description=( - "PersistentVolumeClaimVolumeSource represents a reference to a" + "persistentVolumeClaimVolumeSource represents a reference to a" " PersistentVolumeClaim in the same namespace. More info:" " https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims" ), @@ -3877,7 +4279,7 @@ class Volume(BaseModel): Field( alias="photonPersistentDisk", description=( - "PhotonPersistentDisk represents a PhotonController persistent disk" + "photonPersistentDisk represents a PhotonController persistent disk" " attached and mounted on kubelets host machine" ), ), @@ -3887,23 +4289,23 @@ class Volume(BaseModel): Field( alias="portworxVolume", description=( - "PortworxVolume represents a portworx volume attached and mounted on" " kubelets host machine" + "portworxVolume represents a portworx volume attached and mounted on" " kubelets host machine" ), ), ] = None projected: Annotated[ Optional[ProjectedVolumeSource], - Field(description=("Items for all in one resources secrets, configmaps, and downward API")), + Field(description=("projected items for all in one resources secrets, configmaps, and" " downward API")), ] = None quobyte: Annotated[ Optional[QuobyteVolumeSource], - Field(description=("Quobyte represents a Quobyte mount on the host that shares a pod's" " lifetime")), + Field(description=("quobyte represents a Quobyte mount on the host that shares a pod's" " lifetime")), ] = None rbd: Annotated[ Optional[RBDVolumeSource], Field( description=( - "RBD represents a Rados Block Device mount on the host that shares a" + "rbd represents a Rados Block Device mount on the host that shares a" " pod's lifetime. More info:" " https://examples.k8s.io/volumes/rbd/README.md" ) @@ -3914,7 +4316,7 @@ class Volume(BaseModel): Field( alias="scaleIO", description=( - "ScaleIO represents a ScaleIO persistent volume attached and mounted on" " Kubernetes nodes." + "scaleIO represents a ScaleIO persistent volume attached and mounted on" " Kubernetes nodes." ), ), ] = None @@ -3922,19 +4324,19 @@ class Volume(BaseModel): Optional[SecretVolumeSource], Field( description=( - "Secret represents a secret that should populate this volume. More" + "secret represents a secret that should populate this volume. More" " info: https://kubernetes.io/docs/concepts/storage/volumes#secret" ) ), ] = None storageos: Annotated[ Optional[StorageOSVolumeSource], - Field(description=("StorageOS represents a StorageOS volume attached and mounted on" " Kubernetes nodes.")), + Field(description=("storageOS represents a StorageOS volume attached and mounted on" " Kubernetes nodes.")), ] = None vsphere_volume: Annotated[ Optional[VsphereVirtualDiskVolumeSource], Field( alias="vsphereVolume", - description=("VsphereVolume represents a vSphere volume attached and mounted on" " kubelets host machine"), + description=("vsphereVolume represents a vSphere volume attached and mounted on" " kubelets host machine"), ), ] = None diff --git a/src/hera/workflows/models/io/k8s/api/policy/__init__.py b/src/hera/workflows/models/io/k8s/api/policy/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/io/k8s/api/policy/__init__.py +++ b/src/hera/workflows/models/io/k8s/api/policy/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/io/k8s/api/policy/v1.py b/src/hera/workflows/models/io/k8s/api/policy/v1.py index bb608704c..a4ac7ee52 100644 --- a/src/hera/workflows/models/io/k8s/api/policy/v1.py +++ b/src/hera/workflows/models/io/k8s/api/policy/v1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -47,3 +47,32 @@ class PodDisruptionBudgetSpec(BaseModel): ) ), ] = None + unhealthy_pod_eviction_policy: Annotated[ + Optional[str], + Field( + alias="unhealthyPodEvictionPolicy", + description=( + "UnhealthyPodEvictionPolicy defines the criteria for when unhealthy" + " pods should be considered for eviction. Current implementation" + " considers healthy pods, as pods that have status.conditions item with" + ' type="Ready",status="True".\n\nValid policies are IfHealthyBudget and' + " AlwaysAllow. If no policy is specified, the default behavior will be" + " used, which corresponds to the IfHealthyBudget" + " policy.\n\nIfHealthyBudget policy means that running pods" + ' (status.phase="Running"), but not yet healthy can be evicted only if' + " the guarded application is not disrupted (status.currentHealthy is at" + " least equal to status.desiredHealthy). Healthy pods will be subject" + " to the PDB for eviction.\n\nAlwaysAllow policy means that all running" + ' pods (status.phase="Running"), but not yet healthy are considered' + " disrupted and can be evicted regardless of whether the criteria in a" + " PDB is met. This means perspective running pods of a disrupted" + " application might not get a chance to become healthy. Healthy pods" + " will be subject to the PDB for eviction.\n\nAdditional policies may" + " be added in the future. Clients making eviction decisions should" + " disallow eviction of unhealthy pods if they encounter an unrecognized" + " policy in this field.\n\nThis field is beta-level. The eviction API" + " uses this field when the feature gate PDBUnhealthyPodEvictionPolicy" + " is enabled (enabled by default)." + ), + ), + ] = None diff --git a/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/__init__.py b/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/__init__.py +++ b/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/resource.py b/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/resource.py index 312480253..ae885cc7e 100644 --- a/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/resource.py +++ b/src/hera/workflows/models/io/k8s/apimachinery/pkg/api/resource.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -16,40 +16,40 @@ class Quantity(BaseModel): "Quantity is a fixed-point representation of a number. It provides" " convenient marshaling/unmarshaling in JSON and YAML, in addition to" " String() and AsInt64() accessors.\n\nThe serialization format" - " is:\n\n ::= \n (Note that" - ' may be empty, from the "" case in .)\n ' - " ::= 0 | 1 | ... | 9 ::= |" - " ::= | . |" - ' . | . ::= "+" | "-" ' - " ::= | ::= |" - " | ::= Ki | Mi | Gi |" - " Ti | Pi | Ei\n (International System of units; See:" - " http://physics.nist.gov/cuu/Units/binary.html)\n ::=" - ' m | "" | k | M | G | T | P | E\n (Note that 1024 = 1Ki but 1000 =' - ' 1k; I didn\'t choose the capitalization.)\n ::= "e"' - ' | "E" \n\nNo matter which of the three' - " exponent forms is used, no quantity may represent a number greater" - " than 2^63-1 in magnitude, nor may it have more than 3 decimal places." - " Numbers larger or more precise will be capped or rounded up. (E.g.:" - " 0.1m will rounded up to 1m.) This may be extended in the future if we" - " require larger or smaller quantities.\n\nWhen a Quantity is parsed" - " from a string, it will remember the type of suffix it had, and will" - " use the same type again when it is serialized.\n\nBefore serializing," - ' Quantity will be put in "canonical form". This means that' - " Exponent/suffix will be adjusted up or down (with a corresponding" - " increase or decrease in Mantissa) such that:\n a. No precision is" - " lost\n b. No fractional digits will be emitted\n c. The exponent" - " (or suffix) is as large as possible.\nThe sign will be omitted unless" - " the number is negative.\n\nExamples:\n 1.5 will be serialized as" - ' "1500m"\n 1.5Gi will be serialized as "1536Mi"\n\nNote that the' - " quantity will NEVER be internally represented by a floating point" - " number. That is the whole point of this exercise.\n\nNon-canonical" - " values will still parse as long as they are well formed, but will be" - " re-emitted in their canonical form. (So always use canonical form, or" - " don't diff.)\n\nThis format is intended to make it difficult to use" - " these numbers without writing some sort of special handling code in" - " the hopes that that will cause implementors to also use a fixed point" - " implementation." + " is:\n\n``` ::= \n\n\t(Note" + ' that may be empty, from the "" case in' + " .)\n\n ::= 0 | 1 | ... | 9 " + " ::= | ::= |" + ' . | . | . ::= "+" |' + ' "-" ::= | ' + " ::= | | " + " ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units;" + " See: http://physics.nist.gov/cuu/Units/binary.html)\n\n " + ' ::= m | "" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but' + " 1000 = 1k; I didn't choose the capitalization.)\n\n" + ' ::= "e" | "E" ```\n\nNo matter which of' + " the three exponent forms is used, no quantity may represent a number" + " greater than 2^63-1 in magnitude, nor may it have more than 3 decimal" + " places. Numbers larger or more precise will be capped or rounded up." + " (E.g.: 0.1m will rounded up to 1m.) This may be extended in the" + " future if we require larger or smaller quantities.\n\nWhen a Quantity" + " is parsed from a string, it will remember the type of suffix it had," + " and will use the same type again when it is serialized.\n\nBefore" + ' serializing, Quantity will be put in "canonical form". This means' + " that Exponent/suffix will be adjusted up or down (with a" + " corresponding increase or decrease in Mantissa) such that:\n\n- No" + " precision is lost - No fractional digits will be emitted - The" + " exponent (or suffix) is as large as possible.\n\nThe sign will be" + " omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be" + ' serialized as "1500m" - 1.5Gi will be serialized as "1536Mi"\n\nNote' + " that the quantity will NEVER be internally represented by a floating" + " point number. That is the whole point of this" + " exercise.\n\nNon-canonical values will still parse as long as they" + " are well formed, but will be re-emitted in their canonical form. (So" + " always use canonical form, or don't diff.)\n\nThis format is" + " intended to make it difficult to use these numbers without writing" + " some sort of special handling code in the hopes that that will cause" + " implementors to also use a fixed point implementation." ) ), ] diff --git a/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py b/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py +++ b/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/v1.py b/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/v1.py index be4f29bd8..34970704b 100644 --- a/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/v1.py +++ b/src/hera/workflows/models/io/k8s/apimachinery/pkg/apis/meta/v1.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations @@ -77,10 +77,7 @@ class ListMeta(BaseModel): Field( alias="selfLink", description=( - "selfLink is a URL representing this object. Populated by the system." - " Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field" - " in 1.20 release and the field is planned to be removed in 1.21" - " release." + "Deprecated: selfLink is a legacy read-only field that is no longer" " populated by the system." ), ), ] = None @@ -101,7 +98,8 @@ class CreateOptions(BaseModel): "When present, indicates that modifications should not be\npersisted." " An invalid or unrecognized dryRun directive will\nresult in an error" " response and no further processing of the\nrequest. Valid values" - " are:\n- All: all dry run stages will be processed\n+optional" + " are:\n- All: all dry run stages will be" + " processed\n+optional\n+listType=atomic" ), ), ] = None @@ -123,32 +121,25 @@ class CreateOptions(BaseModel): alias="fieldValidation", title=( "fieldValidation instructs the server on how to handle\nobjects in the" - " request (POST/PUT/PATCH) containing unknown\nor duplicate fields," - " provided that the `ServerSideFieldValidation`\nfeature gate is also" - " enabled. Valid values are:\n- Ignore: This will ignore any unknown" - " fields that are silently\ndropped from the object, and will ignore" - " all but the last duplicate\nfield that the decoder encounters. This" - " is the default behavior\nprior to v1.23 and is the default behavior" - " when the\n`ServerSideFieldValidation` feature gate is disabled.\n-" - " Warn: This will send a warning via the standard warning" - " response\nheader for each unknown field that is dropped from the" - " object, and\nfor each duplicate field that is encountered. The" - " request will\nstill succeed if there are no other errors, and will" - " only persist\nthe last of any duplicate fields. This is the default" - " when the\n`ServerSideFieldValidation` feature gate is enabled.\n-" - " Strict: This will fail the request with a BadRequest error if\nany" - " unknown fields would be dropped from the object, or if any\nduplicate" - " fields are present. The error returned from the server\nwill contain" - " all unknown and duplicate fields encountered.\n+optional" + " request (POST/PUT/PATCH) containing unknown\nor duplicate fields." + " Valid values are:\n- Ignore: This will ignore any unknown fields that" + " are silently\ndropped from the object, and will ignore all but the" + " last duplicate\nfield that the decoder encounters. This is the" + " default behavior\nprior to v1.23.\n- Warn: This will send a warning" + " via the standard warning response\nheader for each unknown field that" + " is dropped from the object, and\nfor each duplicate field that is" + " encountered. The request will\nstill succeed if there are no other" + " errors, and will only persist\nthe last of any duplicate fields. This" + " is the default in v1.23+\n- Strict: This will fail the request with a" + " BadRequest error if\nany unknown fields would be dropped from the" + " object, or if any\nduplicate fields are present. The error returned" + " from the server\nwill contain all unknown and duplicate fields" + " encountered.\n+optional" ), ), ] = None -class Duration(BaseModel): - duration: Optional[str] = None - - class OwnerReference(BaseModel): api_version: Annotated[str, Field(alias="apiVersion", description="API version of the referent.")] block_owner_deletion: Annotated[ @@ -158,7 +149,10 @@ class OwnerReference(BaseModel): description=( 'If true, AND if the owner has the "foregroundDeletion" finalizer, then' " the owner cannot be deleted from the key-value store until this" - " reference is removed. Defaults to false. To set this field, a user" + " reference is removed. See" + " https://kubernetes.io/docs/concepts/architecture/garbage-collection/#foreground-deletion" + " for how the garbage collector interacts with this field and enforces" + " the foreground deletion. Defaults to false. To set this field, a user" ' needs "delete" permission of the owner, otherwise 422 (Unprocessable' " Entity) will be returned." ), @@ -180,13 +174,19 @@ class OwnerReference(BaseModel): name: Annotated[ str, Field( - description=("Name of the referent. More info:" " http://kubernetes.io/docs/user-guide/identifiers#names") + description=( + "Name of the referent. More info:" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" + ) ), ] uid: Annotated[ str, Field( - description=("UID of the referent. More info:" " http://kubernetes.io/docs/user-guide/identifiers#uids") + description=( + "UID of the referent. More info:" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" + ) ), ] @@ -226,41 +226,6 @@ class LabelSelectorRequirement(BaseModel): ] = None -class StatusCause(BaseModel): - field: Annotated[ - Optional[str], - Field( - description=( - "The field of the resource that has caused this error, as named by its" - " JSON serialization. May include dot and postfix notation for nested" - " attributes. Arrays are zero-indexed. Fields may appear more than" - " once in an array of causes due to fields having multiple errors." - ' Optional.\n\nExamples:\n "name" - the field "name" on the current' - ' resource\n "items[0].name" - the field "name" on the first array' - ' entry in "items"' - ) - ), - ] = None - message: Annotated[ - Optional[str], - Field( - description=( - "A human-readable description of the cause of the error. This field" - " may be presented as-is to a reader." - ) - ), - ] = None - reason: Annotated[ - Optional[str], - Field( - description=( - "A machine-readable description of the cause of the error. If this" - " value is empty there is no information available." - ) - ), - ] = None - - class ManagedFieldsEntry(BaseModel): api_version: Annotated[ Optional[str], @@ -323,7 +288,11 @@ class ManagedFieldsEntry(BaseModel): Optional[Time], Field( description=( - "Time is timestamp of when these fields were set. It should always be" " empty if Operation is 'Apply'" + "Time is the timestamp of when the ManagedFields entry was added. The" + " timestamp will also be updated if a field is added, the manager" + " changes any of the owned fields value or removes a field. The" + " timestamp does not update when a field is removed from the entry" + " because another manager took it over." ) ), ] = None @@ -360,22 +329,10 @@ class ObjectMeta(BaseModel): " that may be set by external tools to store and retrieve arbitrary" " metadata. They are not queryable and should be preserved when" " modifying objects. More info:" - " http://kubernetes.io/docs/user-guide/annotations" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations" ) ), ] = None - cluster_name: Annotated[ - Optional[str], - Field( - alias="clusterName", - description=( - "The name of the cluster which the object belongs to. This is used to" - " distinguish resources with same name and namespace in different" - " clusters. This field is not set anywhere right now and apiserver is" - " going to ignore it if set in create or update request." - ), - ), - ] = None creation_timestamp: Annotated[ Optional[Time], Field( @@ -464,12 +421,8 @@ class ObjectMeta(BaseModel): " suffix. The provided value has the same validation rules as the Name" " field, and may be truncated by the length of the suffix required to" " make the value unique on the server.\n\nIf this field is specified" - " and the generated name exists, the server will NOT return a 409 -" - " instead, it will either return 201 Created or 500 with Reason" - " ServerTimeout indicating a unique name could not be found in the time" - " allotted, and the client should retry (optionally after the time" - " indicated in the Retry-After header).\n\nApplied only if Name is not" - " specified. More info:" + " and the generated name exists, the server will return a" + " 409.\n\nApplied only if Name is not specified. More info:" " https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency" ), ), @@ -490,7 +443,7 @@ class ObjectMeta(BaseModel): "Map of string keys and values that can be used to organize and" " categorize (scope and select) objects. May match selectors of" " replication controllers and services. More info:" - " http://kubernetes.io/docs/user-guide/labels" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/labels" ) ), ] = None @@ -518,7 +471,7 @@ class ObjectMeta(BaseModel): " generation of an appropriate name automatically. Name is primarily" " intended for creation idempotence and configuration definition." " Cannot be updated. More info:" - " http://kubernetes.io/docs/user-guide/identifiers#names" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names" ) ), ] = None @@ -531,7 +484,8 @@ class ObjectMeta(BaseModel): ' "default" is the canonical representation. Not all objects are' " required to be scoped to a namespace - the value of this field for" " those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be" - " updated. More info: http://kubernetes.io/docs/user-guide/namespaces" + " updated. More info:" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces" ) ), ] = None @@ -570,10 +524,7 @@ class ObjectMeta(BaseModel): Field( alias="selfLink", description=( - "SelfLink is a URL representing this object. Populated by the system." - " Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field" - " in 1.20 release and the field is planned to be removed in 1.21" - " release." + "Deprecated: selfLink is a legacy read-only field that is no longer" " populated by the system." ), ), ] = None @@ -585,7 +536,7 @@ class ObjectMeta(BaseModel): " typically generated by the server on successful creation of a" " resource and is not allowed to change on PUT operations.\n\nPopulated" " by the system. Read-only. More info:" - " http://kubernetes.io/docs/user-guide/identifiers#uids" + " https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids" ) ), ] = None diff --git a/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/__init__.py b/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/__init__.py index 9d81b463d..14ef8957d 100644 --- a/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/__init__.py +++ b/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/__init__.py @@ -1,2 +1,2 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json diff --git a/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/intstr.py b/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/intstr.py index 491566647..14b3f26cc 100644 --- a/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/intstr.py +++ b/src/hera/workflows/models/io/k8s/apimachinery/pkg/util/intstr.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/workflows/models/sensor.py b/src/hera/workflows/models/sensor.py index 35f4ed6cc..8c619de1f 100644 --- a/src/hera/workflows/models/sensor.py +++ b/src/hera/workflows/models/sensor.py @@ -1,5 +1,5 @@ # generated by datamodel-codegen: -# filename: argo-workflows-3.5.5.json +# filename: argo-workflows-3.6.2.json from __future__ import annotations diff --git a/src/hera/workflows/script.py b/src/hera/workflows/script.py index 691af2971..b00d4e8cb 100644 --- a/src/hera/workflows/script.py +++ b/src/hera/workflows/script.py @@ -256,16 +256,16 @@ def _build_script(self) -> _ModelScriptTemplate: name=self.container_name, ports=self.ports, readiness_probe=self.readiness_probe, + resize_policy=self.resize_policy, resources=self._build_resources(), + restart_policy=self.restart_policy, security_context=self.security_context, source=self.constructor.generate_source(self), startup_probe=self.startup_probe, stdin=self.stdin, stdin_once=self.stdin_once, termination_message_path=self.termination_message_path, - termination_message_policy=str(self.termination_message_policy) - if self.termination_message_policy - else None, + termination_message_policy=self.termination_message_policy, tty=self.tty, volume_devices=self.volume_devices, volume_mounts=self._build_volume_mounts(), diff --git a/src/hera/workflows/service.py b/src/hera/workflows/service.py index f98e07af7..5c3ad5156 100644 --- a/src/hera/workflows/service.py +++ b/src/hera/workflows/service.py @@ -128,6 +128,7 @@ def list_archived_workflows( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, name_prefix: Optional[str] = None, namespace: Optional[str] = None, ) -> WorkflowList: @@ -146,6 +147,7 @@ def list_archived_workflows( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, "namePrefix": name_prefix, "namespace": namespace, }, @@ -189,6 +191,7 @@ def list_archived_workflow_label_values( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, namespace: Optional[str] = None, ) -> LabelValues: """API documentation.""" @@ -206,6 +209,7 @@ def list_archived_workflow_label_values( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, "namespace": namespace, }, headers={"Authorization": self.token}, @@ -302,6 +306,7 @@ def list_cluster_workflow_templates( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> ClusterWorkflowTemplateList: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -318,6 +323,7 @@ def list_cluster_workflow_templates( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, @@ -452,6 +458,7 @@ def list_cron_workflows( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> CronWorkflowList: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -470,6 +477,7 @@ def list_cron_workflows( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, @@ -714,6 +722,7 @@ def list_workflow_templates( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, ) -> WorkflowTemplateList: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -733,6 +742,7 @@ def list_workflow_templates( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, }, headers={"Authorization": self.token}, data=None, @@ -882,7 +892,9 @@ def list_workflows( timeout_seconds: Optional[str] = None, limit: Optional[str] = None, continue_: Optional[str] = None, + send_initial_events: Optional[bool] = None, fields: Optional[str] = None, + name_filter: Optional[str] = None, ) -> WorkflowList: """API documentation.""" assert valid_host_scheme(self.host), "The host scheme is required for service usage" @@ -901,7 +913,9 @@ def list_workflows( "listOptions.timeoutSeconds": timeout_seconds, "listOptions.limit": limit, "listOptions.continue": continue_, + "listOptions.sendInitialEvents": send_initial_events, "fields": fields, + "nameFilter": name_filter, }, headers={"Authorization": self.token}, data=None, diff --git a/src/hera/workflows/volume.py b/src/hera/workflows/volume.py index 5813b42a0..e10e68ad9 100644 --- a/src/hera/workflows/volume.py +++ b/src/hera/workflows/volume.py @@ -34,12 +34,12 @@ ProjectedVolumeSource as _ModelProjectedVolumeSource, QuobyteVolumeSource as _ModelQuobyteVolumeSource, RBDVolumeSource as _ModelRBDVolumeSource, - ResourceRequirements, ScaleIOVolumeSource as _ModelScaleIOVolumeSource, SecretVolumeSource as _ModelSecretVolumeSource, StorageOSVolumeSource as _ModelStorageOSVolumeSource, Volume as _ModelVolume, VolumeMount as _ModelVolumeMount, + VolumeResourceRequirements, VsphereVirtualDiskVolumeSource as _ModelVsphereVirtualDiskVolumeSource, ) from hera.workflows.validators import validate_storage_units @@ -540,7 +540,7 @@ class Volume(_BaseVolume, _ModelPersistentVolumeClaimSpec): """ size: Optional[str] = None # type: ignore - resources: Optional[ResourceRequirements] = None + resources: Optional[VolumeResourceRequirements] = None metadata: Optional[ObjectMeta] = None access_modes: Optional[List[Union[str, AccessMode]]] = [AccessMode.read_write_once] # type: ignore storage_class_name: Optional[str] = None @@ -565,7 +565,7 @@ def _check_name(cls, v): @root_validator(pre=True) def _merge_reqs(cls, values): if "size" in values and "resources" in values: - resources: ResourceRequirements = values.get("resources") + resources: VolumeResourceRequirements = values.get("resources") if resources.requests is not None: if "storage" in resources.requests: pass # take the storage specification in resources @@ -575,9 +575,9 @@ def _merge_reqs(cls, values): elif "resources" not in values: assert "size" in values, "at least one of `size` or `resources` must be specified" validate_storage_units(cast(str, values.get("size"))) - values["resources"] = ResourceRequirements(requests={"storage": values.get("size")}) + values["resources"] = VolumeResourceRequirements(requests={"storage": values.get("size")}) elif "resources" in values: - resources = cast(ResourceRequirements, values.get("resources")) + resources = cast(VolumeResourceRequirements, values.get("resources")) assert resources.requests is not None, "Resource requests are required" storage = resources.requests.get("storage") assert storage is not None, "At least one of `size` or `resources.requests.storage` must be specified" diff --git a/src/hera/workflows/workflow.py b/src/hera/workflows/workflow.py index 825e39ca2..c5e3e448d 100644 --- a/src/hera/workflows/workflow.py +++ b/src/hera/workflows/workflow.py @@ -154,7 +154,6 @@ def _build_templates(self) -> Optional[List[TTemplate]]: # ObjectMeta fields - https://argoproj.github.io/argo-workflows/fields/#objectmeta annotations: Annotated[Optional[Dict[str, str]], _WorkflowModelMapper("metadata.annotations")] = None - cluster_name: Annotated[Optional[str], _WorkflowModelMapper("metadata.cluster_name")] = None creation_timestamp: Annotated[Optional[Time], _WorkflowModelMapper("metadata.creation_timestamp")] = None deletion_grace_period_seconds: Annotated[ Optional[int], _WorkflowModelMapper("metadata.deletion_grace_period_seconds") diff --git a/tests/submissions/test_dag_artifacts.py b/tests/submissions/test_dag_artifacts.py index 271e5f848..03f1375dd 100644 --- a/tests/submissions/test_dag_artifacts.py +++ b/tests/submissions/test_dag_artifacts.py @@ -13,6 +13,7 @@ def get_workflow() -> Workflow: namespace="argo", verify_ssl=False, ), + service_account_name="argo", ) as w: hello_world_to_file = Container( name="hello-world-to-file", diff --git a/tests/submissions/test_hello_world.py b/tests/submissions/test_hello_world.py index 300023a5e..114d43aa1 100644 --- a/tests/submissions/test_hello_world.py +++ b/tests/submissions/test_hello_world.py @@ -23,6 +23,7 @@ def get_workflow() -> Workflow: namespace="argo", verify_ssl=False, ), + service_account_name="argo", ) as w: with Steps(name="steps"): echo_to_param(arguments={"message": "Hello world!"}) diff --git a/tests/submissions/test_optional_input_parameter.py b/tests/submissions/test_optional_input_parameter.py index 6a8f81ea8..15a65b650 100644 --- a/tests/submissions/test_optional_input_parameter.py +++ b/tests/submissions/test_optional_input_parameter.py @@ -25,6 +25,7 @@ def get_workflow() -> Workflow: namespace="argo", verify_ssl=False, ), + service_account_name="argo", ) as w: with Steps(name="steps"): print_msg(name="step-1", arguments={"message": "Hello world!"}) diff --git a/tests/test_remaining_examples.py b/tests/test_remaining_examples.py index 1c4bd0735..c4972189f 100644 --- a/tests/test_remaining_examples.py +++ b/tests/test_remaining_examples.py @@ -20,16 +20,8 @@ "cluster-workflow-template__clustertemplates.upstream.yaml", "cron-backfill.upstream.yaml", "memoize-simple.upstream.yaml", - "pod-gc-strategy-with-label-selector.upstream.yaml", - "pod-gc-strategy.upstream.yaml", "webhdfs-input-output-artifacts.upstream.yaml", "workflow-template__templates.upstream.yaml", - "synchronization-wf-level.upstream.yaml", - "synchronization-mutex-tmpl-level.upstream.yaml", - "synchronization-mutex-wf-level.upstream.yaml", - "synchronization-tmpl-level.upstream.yaml", - "cron-when.upstream.yaml", - "cron-workflow-multiple-schedules.upstream.yaml", ]