From 5f6ff4b0ec274a8c19b8b220ac0164669ec23324 Mon Sep 17 00:00:00 2001 From: pigeonligh Date: Fri, 23 Oct 2026 15:28:06 +0800 Subject: [PATCH] feat!: runtime-neutral Task execution, Cluster resource, tenant-enforced APIs, and unified contracts Consolidates a period of internal iteration. BREAKING CHANGE: The Task data structure is not backward compatible. Existing Task/Job/Workflow objects written with the old schema will not validate or reconcile. Recommended path: create a new environment on this version and recreate workloads from the new manifests. An in-place upgrade requires rewriting every manifest before the first reconcile, and a downgrade is not lossless (removed fields are not restored). Highlights: - Data plane: runtime-neutral Task execution framework under pkg/agent/execution/** (host, coordination/coordinator, workload, binding, environment, runtime, plan, trigger, evidence, observability, fault, gRPC transports); concrete Kubernetes implementations under controllers/task/**; supervisor-based management of Ray and workload SSH processes. - Task CRD redesign: spec.runtime{kind,name}, spec.workload {kind,version,parameters,carrier,template}, spec.placement.nodeSelector, spec.environments[], spec.suspended; removes spec.agentType, top-level nodeSelector, kubernetes/docker/raw specs, tensorBoardDir, prepareScript, runScript, sshPublicKey, and the deprecated pvcStorageMap/pvcSizeGbMap. Job/Workflow spec.stopped renamed to spec.suspended. - Unified Phase/Condition/ObservedGeneration contract across Job, Workflow, Task, Domain, Addon, Node, and Cluster. - New cluster-scoped Cluster resource with heartbeat-Lease-derived phase and durable cordon/drain intent. - Tenant-aware business resources with server-side enforcement at the Gateway (list narrowing, 403/404 semantics, write-path quotas). - Gateway/DB hardening: unified ErrorResponse and X-Request-Id middleware, strict list filter/pagination validation, deterministic ordering, and no synthesized UIDs. - Job archive with a pluggable persistence backend and POST /jobs/{name}/start. - StorageClass moved to the distribution model. - UI TypeScript CRD models generated from the CRD bases; swagger consistency gate. - Pinned proto toolchain, proto/execution protocol v2, and sdks/execution-go. - Configurable Kind-based e2e test framework. - Documentation updated in English and Chinese. Signed-off-by: pigeonligh --- .github/workflows/ci-tests.yml | 3 + .github/workflows/docker-build.yml | 4 +- .github/workflows/lint.yml | 67 +- .gitignore | 1 + AGENTS.md | 179 +- Makefile | 65 +- api/Makefile | 39 +- api/config/crd/bases/rlinf.io_addons.yaml | 20 + api/config/crd/bases/rlinf.io_clusters.yaml | 157 + .../crd/bases/rlinf.io_domainpeers.yaml | 6 +- api/config/crd/bases/rlinf.io_domains.yaml | 75 + api/config/crd/bases/rlinf.io_jobs.yaml | 15184 ++++++++------- api/config/crd/bases/rlinf.io_nodes.yaml | 105 +- api/config/crd/bases/rlinf.io_pods.yaml | 2 +- api/config/crd/bases/rlinf.io_tasks.yaml | 15132 ++++++++------- api/config/crd/bases/rlinf.io_workflows.yaml | 16002 ++++++++-------- .../rlark.io/v1alpha1/addonstatus.go | 19 +- .../rlark.io/v1alpha1/cluster.go | 241 + .../rlark.io/v1alpha1/clusterspec.go | 59 + .../rlark.io/v1alpha1/clusterstatus.go | 87 + .../rlark.io/v1alpha1/dockercontainerspec.go | 97 - .../rlark.io/v1alpha1/dockertaskspec.go | 43 - .../rlark.io/v1alpha1/dockervolumeref.go | 47 - .../rlark.io/v1alpha1/domainstatus.go | 34 + .../rlark.io/v1alpha1/envvar.go | 47 - .../rlark.io/v1alpha1/jobspec.go | 13 +- .../rlark.io/v1alpha1/jobstatus.go | 22 +- .../rlark.io/v1alpha1/jobtag.go | 13 +- .../rlark.io/v1alpha1/jobtasktemplate.go | 93 +- .../rlark.io/v1alpha1/kubernetestaskspec.go | 38 - .../v1alpha1/kubernetesworkloadspec.go | 93 - .../rlark.io/v1alpha1/nodestatus.go | 72 +- .../rlark.io/v1alpha1/rawtaskspec.go | 63 - .../rlark.io/v1alpha1/taskenvironment.go | 65 + .../rlark.io/v1alpha1/taskplacementspec.go | 46 + .../rlark.io/v1alpha1/taskruntimespec.go | 55 + .../rlark.io/v1alpha1/taskspec.go | 119 +- .../rlark.io/v1alpha1/taskstatus.go | 16 +- .../rlark.io/v1alpha1/taskworkloadcarrier.go | 65 + .../rlark.io/v1alpha1/taskworkloadspec.go | 85 + .../rlark.io/v1alpha1/workflowjobtemplate.go | 4 +- .../rlark.io/v1alpha1/workflowspec.go | 10 +- .../rlark.io/v1alpha1/workflowstatus.go | 22 +- api/kubeclients/applyconfiguration/utils.go | 30 +- .../typed/rlark.io/v1alpha1/cluster.go | 73 + .../rlark.io/v1alpha1/fake/fake_cluster.go | 50 + .../v1alpha1/fake/fake_rlark.io_client.go | 4 + .../rlark.io/v1alpha1/generated_expansion.go | 2 + .../rlark.io/v1alpha1/rlark.io_client.go | 5 + .../informers/externalversions/generic.go | 2 + .../rlark.io/v1alpha1/cluster.go | 114 + .../rlark.io/v1alpha1/interface.go | 7 + .../listers/rlark.io/v1alpha1/cluster.go | 47 + .../rlark.io/v1alpha1/expansion_generated.go | 4 + api/rlark.io/v1alpha1/addon_types.go | 16 +- api/rlark.io/v1alpha1/annotations.go | 3 - api/rlark.io/v1alpha1/cluster_types.go | 59 + api/rlark.io/v1alpha1/conditions.go | 35 + api/rlark.io/v1alpha1/consts.go | 16 + api/rlark.io/v1alpha1/domain_peer_types.go | 2 +- api/rlark.io/v1alpha1/domain_types.go | 12 + api/rlark.io/v1alpha1/groupversion_info.go | 2 + api/rlark.io/v1alpha1/job_types.go | 22 +- api/rlark.io/v1alpha1/node_types.go | 37 +- api/rlark.io/v1alpha1/pod_types.go | 2 +- api/rlark.io/v1alpha1/task_types.go | 155 +- api/rlark.io/v1alpha1/types_test.go | 10 +- api/rlark.io/v1alpha1/workflow_types.go | 22 +- .../v1alpha1/zz_generated.deepcopy.go | 325 +- apps/rlark-ui/.prettierignore | 3 +- apps/rlark-ui/Makefile | 7 +- apps/rlark-ui/eslint.config.js | 2 +- apps/rlark-ui/package-lock.json | 1244 +- apps/rlark-ui/package.json | 5 + apps/rlark-ui/scripts/generate-crd-models.mjs | 72 + apps/rlark-ui/src/admin/AdminDashboard.tsx | 20 +- apps/rlark-ui/src/api.ts | 16 +- apps/rlark-ui/src/backend.ts | 19 +- .../src/components/NodeResourceBrowser.tsx | 39 +- apps/rlark-ui/src/crdModels.ts | 11 + apps/rlark-ui/src/data.ts | 3 +- .../src/generated/rlark-types.contract.ts | 46 + apps/rlark-ui/src/generated/rlark-types.ts | 13 + .../rlark/_schemas/RlinfIoV1alpha1Addon.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Addon.js | 889 + .../_schemas/RlinfIoV1alpha1Cluster.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Cluster.js | 890 + .../rlark/_schemas/RlinfIoV1alpha1Domain.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Domain.js | 853 + .../_schemas/RlinfIoV1alpha1DomainPeer.d.ts | 3 + .../_schemas/RlinfIoV1alpha1DomainPeer.js | 453 + .../rlark/_schemas/RlinfIoV1alpha1Job.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Job.js | 11879 ++++++++++++ .../rlark/_schemas/RlinfIoV1alpha1Node.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Node.js | 1804 ++ .../rlark/_schemas/RlinfIoV1alpha1Pod.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Pod.js | 381 + .../rlark/_schemas/RlinfIoV1alpha1Task.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Task.js | 12068 ++++++++++++ .../_schemas/RlinfIoV1alpha1Workflow.d.ts | 3 + .../rlark/_schemas/RlinfIoV1alpha1Workflow.js | 12050 ++++++++++++ apps/rlark-ui/src/generated/rlark/index.ts | 3 + .../src/generated/rlark/rlinf.io/index.ts | 3 + .../rlark/rlinf.io/v1alpha1/Addon.ts | 109 + .../rlark/rlinf.io/v1alpha1/Cluster.ts | 109 + .../rlark/rlinf.io/v1alpha1/Domain.ts | 109 + .../rlark/rlinf.io/v1alpha1/DomainPeer.ts | 66 + .../generated/rlark/rlinf.io/v1alpha1/Job.ts | 7179 +++++++ .../generated/rlark/rlinf.io/v1alpha1/Node.ts | 190 + .../generated/rlark/rlinf.io/v1alpha1/Pod.ts | 70 + .../generated/rlark/rlinf.io/v1alpha1/Task.ts | 7192 +++++++ .../rlark/rlinf.io/v1alpha1/Workflow.ts | 7186 +++++++ .../rlark/rlinf.io/v1alpha1/index.ts | 11 + apps/rlark-ui/src/mockBackend.ts | 165 +- apps/rlark-ui/src/pages/ClusterManagement.tsx | 58 +- apps/rlark-ui/src/pages/Clusters.tsx | 61 +- apps/rlark-ui/src/pages/CreateJob.tsx | 61 +- apps/rlark-ui/src/pages/Jobs.tsx | 22 +- apps/rlark-ui/src/pages/SSHKeys.tsx | 5 +- apps/rlark-ui/src/pages/Storage.tsx | 15 +- apps/rlark-ui/src/pages/Workflows.tsx | 57 +- .../src/styles/nodes/resource-browser.css | 53 +- apps/rlark-ui/src/types.ts | 141 +- apps/rlark-ui/src/utils/crd.ts | 171 +- apps/rlark-ui/src/utils/job.ts | 143 +- .../src/utils/resourceAvailability.ts | 10 +- apps/rlark-ui/tests/api.test.mjs | 44 + apps/rlark-ui/tests/job-actions.test.mjs | 44 +- apps/rlark-ui/tests/job-network.test.mjs | 24 +- apps/rlark-ui/tests/job-storage.test.mjs | 6 +- .../tests/resource-availability.test.mjs | 36 +- apps/rlark-ui/tests/workflow-actions.test.mjs | 13 +- apps/rlark/Dockerfile | 2 + apps/rlark/README.md | 34 +- apps/rlark/cmd/rlark-tools/main.go | 86 +- apps/rlark/cmd/rlark-tools/main_test.go | 15 + apps/rlark/docs/README.md | 4 +- apps/rlark/docs/admin-guide/agent.md | 73 +- .../docs/admin-guide/embodied-runtime.md | 8 +- apps/rlark/docs/api/examples.md | 100 +- apps/rlark/docs/api/reference.md | 9 +- apps/rlark/docs/api/swagger.yaml | 347 +- apps/rlark/docs/architecture.md | 20 +- apps/rlark/docs/concepts.md | 218 +- apps/rlark/docs/deployment.md | 3 + .../docs/developer-guide/api-conventions.md | 616 + .../docs/developer-guide/design-principles.md | 283 + .../rlark/docs/developer-guide/e2e-testing.md | 50 + apps/rlark/docs/developer-guide/index.md | 6 +- .../docs/developer-guide/local-development.md | 86 +- .../docs/developer-guide/project-layout.md | 5 +- .../docs/developer-guide/runtime-provider.md | 367 + apps/rlark/docs/developer-guide/tenancy.md | 79 + .../docs/examples/cross-cluster-ping.yaml | 88 +- apps/rlark/docs/examples/quickstart-cp.sh | 7 +- apps/rlark/docs/examples/quickstart.sh | 7 +- apps/rlark/docs/index.md | 38 +- .../changes/cluster-management-changes.md | 48 + apps/rlark/docs/reference/configuration.md | 21 +- apps/rlark/docs/reference/crd.md | 313 +- apps/rlark/docs/storage-api.md | 74 +- apps/rlark/docs/user-guide/best-practices.md | 2 +- apps/rlark/docs/user-guide/clusters-nodes.md | 10 +- apps/rlark/docs/user-guide/jobs.md | 21 +- apps/rlark/docs/user-guide/ssh-keys.md | 22 +- apps/rlark/docs/user-guide/storage.md | 26 +- apps/rlark/docs/zh/README.md | 4 +- apps/rlark/docs/zh/admin-guide/agent.md | 73 +- .../docs/zh/admin-guide/embodied-runtime.md | 8 +- apps/rlark/docs/zh/api/examples.md | 100 +- apps/rlark/docs/zh/api/reference.md | 9 +- apps/rlark/docs/zh/architecture.md | 20 +- apps/rlark/docs/zh/concepts.md | 218 +- apps/rlark/docs/zh/deployment.md | 3 + .../zh/developer-guide/api-conventions.md | 320 + .../zh/developer-guide/design-principles.md | 283 + .../docs/zh/developer-guide/e2e-testing.md | 37 + apps/rlark/docs/zh/developer-guide/index.md | 6 +- .../zh/developer-guide/local-development.md | 77 +- .../docs/zh/developer-guide/project-layout.md | 5 +- .../zh/developer-guide/runtime-provider.md | 338 + apps/rlark/docs/zh/developer-guide/tenancy.md | 49 + apps/rlark/docs/zh/index.md | 38 +- apps/rlark/docs/zh/reference/configuration.md | 21 +- apps/rlark/docs/zh/reference/crd.md | 4 +- apps/rlark/docs/zh/storage-api.md | 76 +- .../docs/zh/user-guide/best-practices.md | 2 +- .../docs/zh/user-guide/clusters-nodes.md | 10 +- apps/rlark/docs/zh/user-guide/jobs.md | 21 +- apps/rlark/docs/zh/user-guide/ssh-keys.md | 22 +- apps/rlark/docs/zh/user-guide/storage.md | 26 +- apps/rlark/go.mod | 7 +- apps/rlark/mkdocs.yml | 5 + apps/rlark/pkg/agent/agent.go | 12 +- apps/rlark/pkg/agent/cluster_agent.go | 16 + apps/rlark/pkg/agent/config.go | 25 +- apps/rlark/pkg/agent/config_test.go | 38 + apps/rlark/pkg/agent/container/ssh_dialer.go | 743 - .../pkg/agent/container/ssh_dialer_test.go | 711 - .../rlark/pkg/agent/controllers/addon/pull.go | 69 +- .../pkg/agent/controllers/addon/pull_test.go | 121 + apps/rlark/pkg/agent/controllers/node/push.go | 57 +- .../pkg/agent/controllers/node/push_test.go | 75 +- .../rlark/pkg/agent/controllers/node/sweep.go | 77 + .../pkg/agent/controllers/node/sweep_test.go | 100 + apps/rlark/pkg/agent/controllers/pod/push.go | 5 +- .../pkg/agent/controllers/pod/push_test.go | 4 +- apps/rlark/pkg/agent/controllers/pod/sweep.go | 5 +- .../pkg/agent/controllers/task/api/decode.go | 33 + .../agent/controllers/task/api/decode_test.go | 37 + .../pkg/agent/controllers/task/api/types.go | 69 + .../kubernetes/kubernetesobjects/metadata.go | 16 + .../kubernetesobjects/metadata_test.go | 28 + .../kubernetes/kubernetesobjects/names.go | 21 + .../kubernetes/kubernetesobjects/profiles.go | 83 + .../kubernetesobjects/profiles_test.go | 31 + .../kubernetes/kubernetesobjects/workload.go | 166 + .../task/compatibility/kubernetes/task.go | 100 + .../compatibility/kubernetes/task_test.go | 235 + .../pkg/agent/controllers/task/controller.go | 149 + .../pkg/agent/controllers/task/dispatch.go | 167 + .../rlark/pkg/agent/controllers/task/embed.go | 12 - .../environment/kubernetes/network/network.go | 233 + .../kubernetes/network/network_test.go | 119 + .../task/environment/kubernetes/resolver.go | 74 + .../environment/kubernetes/resolver_test.go | 194 + .../task/environment/kubernetes/ssh/ssh.go | 344 + .../environment/kubernetes/ssh/ssh_test.go | 209 + .../kubernetes/tensorboard/tensorboard.go | 264 + .../tensorboard/tensorboard_test.go | 96 + .../pkg/agent/controllers/task/execution.go | 36 + .../controllers/task/execution_kubernetes.go | 158 + .../agent/controllers/task/execution_test.go | 1496 ++ .../agent/controllers/task/files/ray_check.py | 98 - .../agent/controllers/task/files/ray_head.sh | 102 - .../controllers/task/files/ray_worker.sh | 88 - .../task/kubernetes/podunit/accessor.go | 118 + .../task/kubernetes/podunit/accessor_test.go | 96 + .../controllers/task/lifecycle_kubernetes.go | 57 + .../agent/controllers/task/lifecycle_test.go | 667 - .../agent/controllers/task/network_sidecar.go | 58 - apps/rlark/pkg/agent/controllers/task/pull.go | 1214 +- .../pkg/agent/controllers/task/pull_test.go | 694 - .../agent/controllers/task/push_daemonset.go | 45 +- .../agent/controllers/task/push_deployment.go | 287 +- .../controllers/task/push_statefulset.go | 47 +- .../pkg/agent/controllers/task/ray_init.go | 285 - .../pkg/agent/controllers/task/resync.go | 170 + .../pkg/agent/controllers/task/resync_test.go | 252 + .../task/runtime/kubernetes/comparator.go | 20 + .../runtime/kubernetes/comparator_test.go | 27 + .../kubernetes/desired_validator_test.go | 44 + .../task/runtime/kubernetes/lowering.go | 87 + .../task/runtime/kubernetes/lowering_test.go | 123 + .../task/runtime/kubernetes/metadata.go | 72 + .../task/runtime/kubernetes/metadata_test.go | 91 + .../runtime/kubernetes/object_factory_test.go | 74 + .../task/runtime/kubernetes/profile.go | 275 + .../task/runtime/kubernetes/profile_test.go | 48 + .../task/runtime/kubernetes/provider.go | 1348 ++ .../task/runtime/kubernetes/provider_test.go | 1088 ++ .../kubernetes/supervision/assembler.go | 240 + .../kubernetes/supervision/assembler_test.go | 153 + .../runtime/kubernetes/supervision/tools.go | 123 + .../kubernetes/supervision/tools_test.go | 80 + .../agent/controllers/task/sidecar_utils.go | 36 - .../pkg/agent/controllers/task/ssh_init.go | 51 - .../pkg/agent/controllers/task/trigger.go | 96 + .../agent/controllers/task/trigger_test.go | 132 + .../task/workload/ray/kubernetes/adapter.go | 548 + .../workload/ray/kubernetes/adapter_test.go | 541 + .../workload/ray/kubernetes/compatibility.go | 216 + .../task/workload/ray/kubernetes/observe.go | 118 + .../workload/ray/kubernetes/operations.go | 53 + .../ray/kubernetes/operations_test.go | 61 + .../workload/ray/kubernetes/registrations.go | 19 + .../ray/kubernetes/registrations_test.go | 29 + .../task/workload/ray/kubernetes/resources.go | 126 + .../workload/ray/kubernetes/resources_test.go | 56 + apps/rlark/pkg/agent/execution/README.md | 141 + .../pkg/agent/execution/binding/binder.go | 159 + .../agent/execution/binding/binder_test.go | 254 + .../execution/binding/desired_validator.go | 46 + .../binding/desired_validator_test.go | 65 + .../coordination/coordinator/coordinator.go | 947 + .../coordinator/coordinator_test.go | 785 + .../agent/execution/coordination/registry.go | 42 + .../execution/coordination/registry_test.go | 30 + .../pkg/agent/execution/coordination/types.go | 67 + .../agent/execution/environment/copy_test.go | 34 + .../pkg/agent/execution/environment/doc.go | 28 + .../agent/execution/environment/handler.go | 332 + .../execution/environment/handler_test.go | 246 + .../agent/execution/environment/material.go | 126 + .../execution/environment/material_test.go | 186 + .../execution/environment/passthrough.go | 21 + .../execution/environment/passthrough_test.go | 31 + .../agent/execution/environment/revision.go | 50 + .../execution/environment/revision_test.go | 81 + .../pkg/agent/execution/environment/target.go | 85 + .../execution/environment/target_test.go | 108 + .../pkg/agent/execution/environment/types.go | 81 + .../agent/execution/environment/types_test.go | 19 + .../pkg/agent/execution/evidence/evidence.go | 167 + .../agent/execution/evidence/evidence_test.go | 68 + apps/rlark/pkg/agent/execution/fault/fault.go | 153 + .../pkg/agent/execution/fault/fault_test.go | 68 + apps/rlark/pkg/agent/execution/host/bundle.go | 63 + apps/rlark/pkg/agent/execution/host/host.go | 775 + .../pkg/agent/execution/host/host_test.go | 1408 ++ .../pkg/agent/execution/host/registry.go | 85 + .../pkg/agent/execution/host/registry_test.go | 108 + apps/rlark/pkg/agent/execution/host/status.go | 53 + .../pkg/agent/execution/host/status_test.go | 39 + apps/rlark/pkg/agent/execution/host/types.go | 209 + .../execution/observability/config_env.go | 49 + .../observability/config_env_test.go | 33 + .../execution/observability/observability.go | 288 + .../observability/observability_test.go | 117 + .../execution/observability/recording.go | 70 + .../agent/execution/observability/sanitize.go | 47 + .../observability/sanitize_unsafe.go | 11 + apps/rlark/pkg/agent/execution/plan/copy.go | 58 + .../pkg/agent/execution/plan/copy_test.go | 45 + apps/rlark/pkg/agent/execution/plan/types.go | 116 + .../pkg/agent/execution/plan/types_test.go | 19 + apps/rlark/pkg/agent/execution/plan/unit.go | 59 + .../pkg/agent/execution/plan/unit_test.go | 56 + .../pkg/agent/execution/process/types.go | 37 + .../pkg/agent/execution/runtime/lowering.go | 18 + .../rlark/pkg/agent/execution/runtime/plan.go | 62 + .../pkg/agent/execution/runtime/plan_test.go | 118 + .../runtime/transport/grpc/client.go | 155 + .../runtime/transport/grpc/convert.go | 314 + .../runtime/transport/grpc/server.go | 197 + .../runtime/transport/grpc/transport_test.go | 331 + .../pkg/agent/execution/runtime/types.go | 388 + .../pkg/agent/execution/runtime/types_test.go | 15 + .../agent/execution/runtime/unit/accessor.go | 116 + .../execution/runtime/unit/accessor_test.go | 49 + .../agent/execution/transport/grpc/error.go | 20 + .../execution/transport/grpc/error_test.go | 31 + .../pkg/agent/execution/trigger/trigger.go | 260 + .../agent/execution/trigger/trigger_test.go | 99 + .../rlark/pkg/agent/execution/workload/doc.go | 9 + .../pkg/agent/execution/workload/registry.go | 41 + .../agent/execution/workload/registry_test.go | 36 + .../workload/transport/grpc/client.go | 103 + .../workload/transport/grpc/convert.go | 522 + .../workload/transport/grpc/convert_test.go | 100 + .../workload/transport/grpc/server.go | 118 + .../workload/transport/grpc/transport_test.go | 287 + .../pkg/agent/execution/workload/types.go | 86 + .../agent/execution/workload/types_test.go | 20 + apps/rlark/pkg/agent/imagepull/puller.go | 8 +- apps/rlark/pkg/agent/imagepull/puller_test.go | 35 +- apps/rlark/pkg/common/constants.go | 5 + .../archive/archive_controller_test.go | 69 + .../pkg/controllermanager/archive/job.go | 57 + .../pkg/controllermanager/archive/registry.go | 138 + .../cluster/cluster_controller.go | 207 + .../cluster/cluster_controller_test.go | 213 + apps/rlark/pkg/controllermanager/config.go | 22 +- .../pkg/controllermanager/config_test.go | 20 +- .../controllermanager/controller_manager.go | 38 +- .../domain/domain_controller.go | 50 +- .../domain/domain_controller_test.go | 48 +- apps/rlark/pkg/controllermanager/job/build.go | 172 +- .../controllermanager/job/job_controller.go | 56 +- .../job/job_controller_test.go | 227 +- .../controllermanager/job/lifecycle_test.go | 291 +- .../pkg/controllermanager/job/statemachine.go | 1 - apps/rlark/pkg/controllermanager/job/sync.go | 156 +- .../pkg/controllermanager/job/sync_test.go | 290 +- .../controllermanager/node/node_controller.go | 143 +- .../node/node_controller_test.go | 143 + .../controllermanager/sync/generic_handler.go | 14 - .../sync/generic_handler_test.go | 19 +- .../sync/generic_reconciler.go | 46 +- .../pkg/controllermanager/sync/job_sync.go | 6 +- .../pkg/controllermanager/sync/node_sync.go | 6 +- .../pkg/controllermanager/sync/task_sync.go | 6 +- .../controllermanager/sync/workflow_sync.go | 6 +- .../controllermanager/task/task_controller.go | 34 +- .../task/task_controller_test.go | 142 + .../pkg/controllermanager/workflow/build.go | 5 +- .../pkg/controllermanager/workflow/dag.go | 5 + .../workflow/lifecycle_test.go | 65 +- .../workflow/statemachine_test.go | 4 +- .../pkg/controllermanager/workflow/sync.go | 81 +- .../workflow/workflow_controller.go | 15 +- .../workflow/workflow_controller_test.go | 4 +- apps/rlark/pkg/db/migrations_test.go | 77 + apps/rlark/pkg/db/resource_store.go | 179 +- apps/rlark/pkg/db/resource_store_test.go | 327 + .../pkg/gateway/addon_catalog_handler.go | 2 +- apps/rlark/pkg/gateway/addon_handler.go | 24 +- apps/rlark/pkg/gateway/apierror.go | 138 + apps/rlark/pkg/gateway/apierror_test.go | 282 + apps/rlark/pkg/gateway/auth_handler.go | 48 +- apps/rlark/pkg/gateway/auth_handler_test.go | 2 - apps/rlark/pkg/gateway/auth_middleware.go | 8 +- apps/rlark/pkg/gateway/cert_handler.go | 20 +- apps/rlark/pkg/gateway/clusters_handler.go | 107 +- .../pkg/gateway/clusters_handler_test.go | 20 +- apps/rlark/pkg/gateway/config.go | 12 + apps/rlark/pkg/gateway/gateway.go | 20 +- apps/rlark/pkg/gateway/handler.go | 412 +- apps/rlark/pkg/gateway/handler_test.go | 283 + .../pkg/gateway/imageregistry_handler.go | 51 +- apps/rlark/pkg/gateway/images.go | 24 +- apps/rlark/pkg/gateway/images_test.go | 14 +- apps/rlark/pkg/gateway/job_logs.go | 112 +- apps/rlark/pkg/gateway/kube_handler.go | 623 +- apps/rlark/pkg/gateway/kube_handler_test.go | 561 +- apps/rlark/pkg/gateway/kube_proxy.go | 33 + .../pkg/gateway/management_namespace_test.go | 10 +- apps/rlark/pkg/gateway/pod_events.go | 32 +- apps/rlark/pkg/gateway/restore/handler.go | 34 + apps/rlark/pkg/gateway/restore/job.go | 54 + apps/rlark/pkg/gateway/restore/registry.go | 58 + apps/rlark/pkg/gateway/router.go | 27 +- apps/rlark/pkg/gateway/spec_quotas.go | 168 + apps/rlark/pkg/gateway/spec_quotas_test.go | 222 + apps/rlark/pkg/gateway/storage_handler.go | 995 +- .../rlark/pkg/gateway/storage_handler_test.go | 153 + apps/rlark/pkg/gateway/suk_handler.go | 37 +- apps/rlark/pkg/gateway/suk_handler_test.go | 56 + apps/rlark/pkg/gateway/swagger_test.go | 276 +- .../rlark/pkg/gateway/systemconfig_handler.go | 18 +- apps/rlark/pkg/gateway/tenant_scope.go | 309 + apps/rlark/pkg/gateway/tenant_scope_test.go | 251 + apps/rlark/pkg/gateway/tensorboard_handler.go | 174 +- .../pkg/gateway/tensorboard_handler_test.go | 60 + apps/rlark/pkg/gateway/terminal.go | 21 +- apps/rlark/pkg/gateway/user_tenant_handler.go | 145 + .../pkg/gateway/user_tenant_handler_test.go | 131 + apps/rlark/pkg/persistence/backend.go | 57 + apps/rlark/pkg/persistence/postgres.go | 99 + apps/rlark/pkg/persistence/secret.go | 278 + apps/rlark/pkg/persistence/secret_test.go | 110 + .../rlark/pkg/rlarkadm/component/component.go | 5 + .../pkg/rlarkadm/component/component_test.go | 3 + .../raylauncher/files/cluster_check.py | 46 + .../raylauncher/files/prepare_and_exec.sh | 3 + .../pkg/rlarktools/raylauncher/launcher.go | 311 + .../rlarktools/raylauncher/launcher_test.go | 206 + .../rlark/pkg/{ => rlarktools}/sshd/server.go | 29 +- apps/rlark/pkg/rlarktools/sshd/server_test.go | 73 + .../rlark/pkg/rlarktools/supervisor/config.go | 86 + .../pkg/rlarktools/supervisor/config_test.go | 19 + .../supervisor/race_disabled_test.go | 5 + .../supervisor/race_enabled_test.go | 5 + apps/rlark/pkg/rlarktools/supervisor/run.go | 335 + .../pkg/rlarktools/supervisor/run_test.go | 358 + .../rlarktools/supervisor/subreaper_linux.go | 7 + .../rlarktools/supervisor/subreaper_other.go | 5 + apps/rlark/pkg/server/agent.go | 111 +- apps/rlark/pkg/server/agent_test.go | 181 +- apps/rlark/pkg/tenant/tenant.go | 111 + apps/rlark/pkg/tenant/tenant_test.go | 32 + apps/rlark/pkg/utils/task_images.go | 33 +- apps/rlark/pkg/utils/task_images_test.go | 82 +- go.work | 2 + go.work.sum | 4 +- proto/embodied-runtime/Makefile | 36 +- proto/embodied-runtime/buf.yaml | 28 + proto/execution/Makefile | 20 + proto/execution/README.md | 51 + proto/execution/buf.yaml | 17 + proto/execution/common/v1/types.proto | 166 + proto/execution/runtime/v1/runtime.proto | 102 + proto/execution/workload/v1/workload.proto | 152 + proto/toolchain.mk | 154 + .../gen/cameracontroller/v1/camera.pb.go | 809 +- .../gen/cameracontroller/v1/camera_grpc.pb.go | 122 +- .../gen/device/v1/device.pb.go | 105 +- .../gen/device/v1/device_grpc.pb.go | 68 +- .../gen/roscontroller/v1/robot.pb.go | 1507 +- .../gen/roscontroller/v1/robot_grpc.pb.go | 123 +- .../cameracontroller/v1/camera_pb2_grpc.py | 2 +- .../gen/roscontroller/v1/robot_pb2_grpc.py | 2 +- .../requirements-dev.txt | 6 +- sdks/embodied-runtime-python/requirements.txt | 8 +- .../scripts/gen_proto.py | 37 + sdks/embodied-runtime-python/setup.py | 13 +- sdks/execution-go/Makefile | 11 + sdks/execution-go/README.md | 11 + sdks/execution-go/gen/common/v1/types.pb.go | 1710 ++ .../execution-go/gen/runtime/v1/runtime.pb.go | 1089 ++ .../gen/runtime/v1/runtime_grpc.pb.go | 387 + .../gen/workload/v1/workload.pb.go | 1560 ++ .../gen/workload/v1/workload_grpc.pb.go | 243 + sdks/execution-go/go.mod | 17 + sdks/execution-go/go.sum | 38 + test/e2e/Makefile | 38 + test/e2e/README.md | 102 + test/e2e/embodied-runtime/README.md | 4 + test/e2e/framework/cleanup.go | 15 + test/e2e/framework/cluster.go | 59 + test/e2e/framework/cluster_test.go | 22 + test/e2e/framework/command.go | 25 + test/e2e/framework/config.go | 92 + test/e2e/framework/config_test.go | 37 + test/e2e/framework/kind/provider.go | 201 + test/e2e/framework/kind/provider_test.go | 97 + test/e2e/framework/poll.go | 38 + test/e2e/framework/provider.go | 28 + test/e2e/framework/run.go | 78 + test/e2e/framework/scenario.go | 96 + test/e2e/framework/scenario_test.go | 238 + test/e2e/go.mod | 51 + test/e2e/go.sum | 115 + test/e2e/integration/README.md | 5 + test/e2e/rlark/framework/config.go | 46 + test/e2e/rlark/framework/config_test.go | 36 + test/e2e/rlark/framework/environment.go | 60 + test/e2e/rlark/smoke/scenario.go | 175 + test/e2e/rlark/smoke/scenario_test.go | 23 + test/e2e/rlark/smoke/smoke_test.go | 40 + 520 files changed, 137405 insertions(+), 33989 deletions(-) create mode 100644 api/config/crd/bases/rlinf.io_clusters.yaml create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/cluster.go create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterspec.go create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterstatus.go delete mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockercontainerspec.go delete mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockertaskspec.go delete mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockervolumeref.go delete mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/envvar.go delete mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetestaskspec.go delete mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetesworkloadspec.go delete mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/rawtaskspec.go create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskenvironment.go create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskplacementspec.go create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskruntimespec.go create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadcarrier.go create mode 100644 api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadspec.go create mode 100644 api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/cluster.go create mode 100644 api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_cluster.go create mode 100644 api/kubeclients/informers/externalversions/rlark.io/v1alpha1/cluster.go create mode 100644 api/kubeclients/listers/rlark.io/v1alpha1/cluster.go create mode 100644 api/rlark.io/v1alpha1/cluster_types.go create mode 100644 api/rlark.io/v1alpha1/conditions.go create mode 100644 api/rlark.io/v1alpha1/consts.go create mode 100644 apps/rlark-ui/scripts/generate-crd-models.mjs create mode 100644 apps/rlark-ui/src/crdModels.ts create mode 100644 apps/rlark-ui/src/generated/rlark-types.contract.ts create mode 100644 apps/rlark-ui/src/generated/rlark-types.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Cluster.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Cluster.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Domain.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Domain.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1DomainPeer.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1DomainPeer.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Job.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Job.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Node.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Node.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Pod.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Pod.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Task.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Task.js create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Workflow.d.ts create mode 100644 apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Workflow.js create mode 100644 apps/rlark-ui/src/generated/rlark/index.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/index.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Addon.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Cluster.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Domain.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/DomainPeer.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Job.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Node.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Pod.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Task.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Workflow.ts create mode 100644 apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/index.ts create mode 100644 apps/rlark/cmd/rlark-tools/main_test.go create mode 100644 apps/rlark/docs/developer-guide/api-conventions.md create mode 100644 apps/rlark/docs/developer-guide/design-principles.md create mode 100644 apps/rlark/docs/developer-guide/e2e-testing.md create mode 100644 apps/rlark/docs/developer-guide/runtime-provider.md create mode 100644 apps/rlark/docs/developer-guide/tenancy.md create mode 100644 apps/rlark/docs/reference/changes/cluster-management-changes.md create mode 100644 apps/rlark/docs/zh/developer-guide/api-conventions.md create mode 100644 apps/rlark/docs/zh/developer-guide/design-principles.md create mode 100644 apps/rlark/docs/zh/developer-guide/e2e-testing.md create mode 100644 apps/rlark/docs/zh/developer-guide/runtime-provider.md create mode 100644 apps/rlark/docs/zh/developer-guide/tenancy.md delete mode 100644 apps/rlark/pkg/agent/container/ssh_dialer.go delete mode 100644 apps/rlark/pkg/agent/container/ssh_dialer_test.go create mode 100644 apps/rlark/pkg/agent/controllers/addon/pull_test.go create mode 100644 apps/rlark/pkg/agent/controllers/node/sweep.go create mode 100644 apps/rlark/pkg/agent/controllers/node/sweep_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/api/decode.go create mode 100644 apps/rlark/pkg/agent/controllers/task/api/decode_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/api/types.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/kubernetesobjects/metadata.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/kubernetesobjects/metadata_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/kubernetesobjects/names.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/kubernetesobjects/profiles.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/kubernetesobjects/profiles_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/kubernetesobjects/workload.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/task.go create mode 100644 apps/rlark/pkg/agent/controllers/task/compatibility/kubernetes/task_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/dispatch.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/embed.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/network/network.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/network/network_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/resolver.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/resolver_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/ssh/ssh.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/ssh/ssh_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/tensorboard/tensorboard.go create mode 100644 apps/rlark/pkg/agent/controllers/task/environment/kubernetes/tensorboard/tensorboard_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/execution.go create mode 100644 apps/rlark/pkg/agent/controllers/task/execution_kubernetes.go create mode 100644 apps/rlark/pkg/agent/controllers/task/execution_test.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/files/ray_check.py delete mode 100644 apps/rlark/pkg/agent/controllers/task/files/ray_head.sh delete mode 100644 apps/rlark/pkg/agent/controllers/task/files/ray_worker.sh create mode 100644 apps/rlark/pkg/agent/controllers/task/kubernetes/podunit/accessor.go create mode 100644 apps/rlark/pkg/agent/controllers/task/kubernetes/podunit/accessor_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/lifecycle_kubernetes.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/lifecycle_test.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/network_sidecar.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/pull_test.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/ray_init.go create mode 100644 apps/rlark/pkg/agent/controllers/task/resync.go create mode 100644 apps/rlark/pkg/agent/controllers/task/resync_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/comparator.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/comparator_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/desired_validator_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/lowering.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/lowering_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/metadata.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/metadata_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/object_factory_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/profile.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/profile_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/provider.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/provider_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/supervision/assembler.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/supervision/assembler_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/supervision/tools.go create mode 100644 apps/rlark/pkg/agent/controllers/task/runtime/kubernetes/supervision/tools_test.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/sidecar_utils.go delete mode 100644 apps/rlark/pkg/agent/controllers/task/ssh_init.go create mode 100644 apps/rlark/pkg/agent/controllers/task/trigger.go create mode 100644 apps/rlark/pkg/agent/controllers/task/trigger_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/adapter.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/adapter_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/compatibility.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/observe.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/operations.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/operations_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/registrations.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/registrations_test.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/resources.go create mode 100644 apps/rlark/pkg/agent/controllers/task/workload/ray/kubernetes/resources_test.go create mode 100644 apps/rlark/pkg/agent/execution/README.md create mode 100644 apps/rlark/pkg/agent/execution/binding/binder.go create mode 100644 apps/rlark/pkg/agent/execution/binding/binder_test.go create mode 100644 apps/rlark/pkg/agent/execution/binding/desired_validator.go create mode 100644 apps/rlark/pkg/agent/execution/binding/desired_validator_test.go create mode 100644 apps/rlark/pkg/agent/execution/coordination/coordinator/coordinator.go create mode 100644 apps/rlark/pkg/agent/execution/coordination/coordinator/coordinator_test.go create mode 100644 apps/rlark/pkg/agent/execution/coordination/registry.go create mode 100644 apps/rlark/pkg/agent/execution/coordination/registry_test.go create mode 100644 apps/rlark/pkg/agent/execution/coordination/types.go create mode 100644 apps/rlark/pkg/agent/execution/environment/copy_test.go create mode 100644 apps/rlark/pkg/agent/execution/environment/doc.go create mode 100644 apps/rlark/pkg/agent/execution/environment/handler.go create mode 100644 apps/rlark/pkg/agent/execution/environment/handler_test.go create mode 100644 apps/rlark/pkg/agent/execution/environment/material.go create mode 100644 apps/rlark/pkg/agent/execution/environment/material_test.go create mode 100644 apps/rlark/pkg/agent/execution/environment/passthrough.go create mode 100644 apps/rlark/pkg/agent/execution/environment/passthrough_test.go create mode 100644 apps/rlark/pkg/agent/execution/environment/revision.go create mode 100644 apps/rlark/pkg/agent/execution/environment/revision_test.go create mode 100644 apps/rlark/pkg/agent/execution/environment/target.go create mode 100644 apps/rlark/pkg/agent/execution/environment/target_test.go create mode 100644 apps/rlark/pkg/agent/execution/environment/types.go create mode 100644 apps/rlark/pkg/agent/execution/environment/types_test.go create mode 100644 apps/rlark/pkg/agent/execution/evidence/evidence.go create mode 100644 apps/rlark/pkg/agent/execution/evidence/evidence_test.go create mode 100644 apps/rlark/pkg/agent/execution/fault/fault.go create mode 100644 apps/rlark/pkg/agent/execution/fault/fault_test.go create mode 100644 apps/rlark/pkg/agent/execution/host/bundle.go create mode 100644 apps/rlark/pkg/agent/execution/host/host.go create mode 100644 apps/rlark/pkg/agent/execution/host/host_test.go create mode 100644 apps/rlark/pkg/agent/execution/host/registry.go create mode 100644 apps/rlark/pkg/agent/execution/host/registry_test.go create mode 100644 apps/rlark/pkg/agent/execution/host/status.go create mode 100644 apps/rlark/pkg/agent/execution/host/status_test.go create mode 100644 apps/rlark/pkg/agent/execution/host/types.go create mode 100644 apps/rlark/pkg/agent/execution/observability/config_env.go create mode 100644 apps/rlark/pkg/agent/execution/observability/config_env_test.go create mode 100644 apps/rlark/pkg/agent/execution/observability/observability.go create mode 100644 apps/rlark/pkg/agent/execution/observability/observability_test.go create mode 100644 apps/rlark/pkg/agent/execution/observability/recording.go create mode 100644 apps/rlark/pkg/agent/execution/observability/sanitize.go create mode 100644 apps/rlark/pkg/agent/execution/observability/sanitize_unsafe.go create mode 100644 apps/rlark/pkg/agent/execution/plan/copy.go create mode 100644 apps/rlark/pkg/agent/execution/plan/copy_test.go create mode 100644 apps/rlark/pkg/agent/execution/plan/types.go create mode 100644 apps/rlark/pkg/agent/execution/plan/types_test.go create mode 100644 apps/rlark/pkg/agent/execution/plan/unit.go create mode 100644 apps/rlark/pkg/agent/execution/plan/unit_test.go create mode 100644 apps/rlark/pkg/agent/execution/process/types.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/lowering.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/plan.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/plan_test.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/transport/grpc/client.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/transport/grpc/convert.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/transport/grpc/server.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/transport/grpc/transport_test.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/types.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/types_test.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/unit/accessor.go create mode 100644 apps/rlark/pkg/agent/execution/runtime/unit/accessor_test.go create mode 100644 apps/rlark/pkg/agent/execution/transport/grpc/error.go create mode 100644 apps/rlark/pkg/agent/execution/transport/grpc/error_test.go create mode 100644 apps/rlark/pkg/agent/execution/trigger/trigger.go create mode 100644 apps/rlark/pkg/agent/execution/trigger/trigger_test.go create mode 100644 apps/rlark/pkg/agent/execution/workload/doc.go create mode 100644 apps/rlark/pkg/agent/execution/workload/registry.go create mode 100644 apps/rlark/pkg/agent/execution/workload/registry_test.go create mode 100644 apps/rlark/pkg/agent/execution/workload/transport/grpc/client.go create mode 100644 apps/rlark/pkg/agent/execution/workload/transport/grpc/convert.go create mode 100644 apps/rlark/pkg/agent/execution/workload/transport/grpc/convert_test.go create mode 100644 apps/rlark/pkg/agent/execution/workload/transport/grpc/server.go create mode 100644 apps/rlark/pkg/agent/execution/workload/transport/grpc/transport_test.go create mode 100644 apps/rlark/pkg/agent/execution/workload/types.go create mode 100644 apps/rlark/pkg/agent/execution/workload/types_test.go create mode 100644 apps/rlark/pkg/controllermanager/archive/archive_controller_test.go create mode 100644 apps/rlark/pkg/controllermanager/archive/job.go create mode 100644 apps/rlark/pkg/controllermanager/archive/registry.go create mode 100644 apps/rlark/pkg/controllermanager/cluster/cluster_controller.go create mode 100644 apps/rlark/pkg/controllermanager/cluster/cluster_controller_test.go create mode 100644 apps/rlark/pkg/controllermanager/node/node_controller_test.go create mode 100644 apps/rlark/pkg/db/migrations_test.go create mode 100644 apps/rlark/pkg/db/resource_store_test.go create mode 100644 apps/rlark/pkg/gateway/apierror.go create mode 100644 apps/rlark/pkg/gateway/apierror_test.go create mode 100644 apps/rlark/pkg/gateway/handler_test.go create mode 100644 apps/rlark/pkg/gateway/kube_proxy.go create mode 100644 apps/rlark/pkg/gateway/restore/handler.go create mode 100644 apps/rlark/pkg/gateway/restore/job.go create mode 100644 apps/rlark/pkg/gateway/restore/registry.go create mode 100644 apps/rlark/pkg/gateway/spec_quotas.go create mode 100644 apps/rlark/pkg/gateway/spec_quotas_test.go create mode 100644 apps/rlark/pkg/gateway/storage_handler_test.go create mode 100644 apps/rlark/pkg/gateway/tenant_scope.go create mode 100644 apps/rlark/pkg/gateway/tenant_scope_test.go create mode 100644 apps/rlark/pkg/gateway/tensorboard_handler_test.go create mode 100644 apps/rlark/pkg/gateway/user_tenant_handler.go create mode 100644 apps/rlark/pkg/gateway/user_tenant_handler_test.go create mode 100644 apps/rlark/pkg/persistence/backend.go create mode 100644 apps/rlark/pkg/persistence/postgres.go create mode 100644 apps/rlark/pkg/persistence/secret.go create mode 100644 apps/rlark/pkg/persistence/secret_test.go create mode 100644 apps/rlark/pkg/rlarktools/raylauncher/files/cluster_check.py create mode 100644 apps/rlark/pkg/rlarktools/raylauncher/files/prepare_and_exec.sh create mode 100644 apps/rlark/pkg/rlarktools/raylauncher/launcher.go create mode 100644 apps/rlark/pkg/rlarktools/raylauncher/launcher_test.go rename apps/rlark/pkg/{ => rlarktools}/sshd/server.go (92%) create mode 100644 apps/rlark/pkg/rlarktools/sshd/server_test.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/config.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/config_test.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/race_disabled_test.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/race_enabled_test.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/run.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/run_test.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/subreaper_linux.go create mode 100644 apps/rlark/pkg/rlarktools/supervisor/subreaper_other.go create mode 100644 apps/rlark/pkg/tenant/tenant.go create mode 100644 apps/rlark/pkg/tenant/tenant_test.go create mode 100644 proto/embodied-runtime/buf.yaml create mode 100644 proto/execution/Makefile create mode 100644 proto/execution/README.md create mode 100644 proto/execution/buf.yaml create mode 100644 proto/execution/common/v1/types.proto create mode 100644 proto/execution/runtime/v1/runtime.proto create mode 100644 proto/execution/workload/v1/workload.proto create mode 100644 proto/toolchain.mk create mode 100644 sdks/execution-go/Makefile create mode 100644 sdks/execution-go/README.md create mode 100644 sdks/execution-go/gen/common/v1/types.pb.go create mode 100644 sdks/execution-go/gen/runtime/v1/runtime.pb.go create mode 100644 sdks/execution-go/gen/runtime/v1/runtime_grpc.pb.go create mode 100644 sdks/execution-go/gen/workload/v1/workload.pb.go create mode 100644 sdks/execution-go/gen/workload/v1/workload_grpc.pb.go create mode 100644 sdks/execution-go/go.mod create mode 100644 sdks/execution-go/go.sum create mode 100644 test/e2e/Makefile create mode 100644 test/e2e/README.md create mode 100644 test/e2e/embodied-runtime/README.md create mode 100644 test/e2e/framework/cleanup.go create mode 100644 test/e2e/framework/cluster.go create mode 100644 test/e2e/framework/cluster_test.go create mode 100644 test/e2e/framework/command.go create mode 100644 test/e2e/framework/config.go create mode 100644 test/e2e/framework/config_test.go create mode 100644 test/e2e/framework/kind/provider.go create mode 100644 test/e2e/framework/kind/provider_test.go create mode 100644 test/e2e/framework/poll.go create mode 100644 test/e2e/framework/provider.go create mode 100644 test/e2e/framework/run.go create mode 100644 test/e2e/framework/scenario.go create mode 100644 test/e2e/framework/scenario_test.go create mode 100644 test/e2e/go.mod create mode 100644 test/e2e/go.sum create mode 100644 test/e2e/integration/README.md create mode 100644 test/e2e/rlark/framework/config.go create mode 100644 test/e2e/rlark/framework/config_test.go create mode 100644 test/e2e/rlark/framework/environment.go create mode 100644 test/e2e/rlark/smoke/scenario.go create mode 100644 test/e2e/rlark/smoke/scenario_test.go create mode 100644 test/e2e/rlark/smoke/smoke_test.go diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f0c4d09..f83d724 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -46,11 +46,14 @@ jobs: - '.github/workflows/unit-tests.yml' lint_filter: - '**/*.go' + - 'api/**' - 'apps/rlark-ui/**' - 'apps/rlark/docs/**' - 'apps/rlark/mkdocs.yml' - '**/go.mod' - '**/go.sum' + - 'Makefile' + - '**/Makefile' - '.github/workflows/lint.yml' # =============================================== lint ==================================================== diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index cba47e8..aa048ba 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -30,7 +30,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: "npm" cache-dependency-path: apps/rlark-ui/package-lock.json @@ -71,4 +71,4 @@ jobs: context: . file: ./apps/embodied-runtime/Dockerfile push: false - tags: embodied-runtime:latest \ No newline at end of file + tags: embodied-runtime:latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 378335f..0a188a3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -28,6 +28,69 @@ jobs: working-directory: ${{ matrix.module }} args: --timeout 5m + lint-proto: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + # buf breaking resolves its baseline from the local .git directory, + # so the clone must contain the default branch. + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: api/go.mod + cache: true + + # The checked-in stubs embed their generator versions, so regenerating with + # a different toolchain rewrites every file. Install the versions pinned in + # proto/toolchain.mk and requirements-dev.txt. + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.12" + cache: "pip" + cache-dependency-path: sdks/embodied-runtime-python/requirements*.txt + + - name: Install pinned Python proto toolchain + run: python -m pip install --requirement sdks/embodied-runtime-python/requirements-dev.txt + + - name: Install pinned protoc + run: make protoc-install + + - name: Lint protobuf definitions + run: make lint-proto + + - name: Check protobuf compatibility + env: + BASE_REF: ${{ github.event.pull_request.base.sha || format('origin/{0}', github.event.repository.default_branch) }} + run: make proto-breaking PROTO_BREAKING_REF="ref=$BASE_REF" + + - name: Verify generated gRPC stubs are up to date + run: make verify-proto-generated + + verify-generated: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: api/go.mod + cache: true + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + cache: "npm" + cache-dependency-path: apps/rlark-ui/package-lock.json + + - name: Verify generated artifacts are up to date + run: make verify-generated + lint-frontend: runs-on: ubuntu-latest steps: @@ -36,7 +99,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: "20" + node-version: "22" cache: "npm" cache-dependency-path: apps/rlark-ui/package-lock.json @@ -50,7 +113,7 @@ jobs: - name: Run prettier working-directory: apps/rlark-ui - run: npx prettier --check 'src/' 'index.html' 'package.json' 'vite.config.ts' 'tsconfig*.json' + run: npx prettier --check 'src/' 'scripts/' 'index.html' 'package.json' 'vite.config.ts' 'tsconfig*.json' --ignore-path .prettierignore lint-docs: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index adb7476..0d2d746 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ tmp/ *.profraw /coverage/ /apps/rlark-ui/coverage/ +/_artifacts/ # Python cache __pycache__/ diff --git a/AGENTS.md b/AGENTS.md index a4fd077..1e8c78b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,19 +2,69 @@ Brief for AI coding agents working on RLark. For full contribution flow, code style, and PR process see [CONTRIBUTING.md](CONTRIBUTING.md). -**Quick orientation:** RLark is a cross-cluster embodied intelligence platform built with **Go** (control plane + agents) and **TypeScript/React** (web UI). It uses **kcp** as a lightweight Kubernetes API server and operates across multi-runtime data planes (Kubernetes / Docker / Raw). The control plane manages CRDs (Domain, Node, Job, Task, Workflow) and the data plane agents handle workload orchestration and cross-cluster Pod networking via TUN + gVisor + SSH tunnels. All user-facing changes need tests and docs. +**Quick orientation:** RLark is a cross-cluster embodied intelligence platform built with **Go** (control plane + agents) and **TypeScript/React** (web UI). Its management API is Kubernetes-compatible and can use the deployed kcp API server or a configured Kubernetes API. The Kubernetes workload runtime is currently implemented at preview maturity; Docker and Raw workload runtimes are planned and incomplete. The API includes Domain, DomainPeer, Node, Pod, Job, Task, Workflow, and Addon resources. Data-plane agents reconcile Kubernetes workloads, report observed state, and support cross-cluster Pod networking through TUN, gVisor netstack, and SSH relay paths. All user-facing changes need tests and English and Chinese documentation. + +## Required design guidance + +Before designing or implementing a change, read [Project Design Principles](apps/rlark/docs/developer-guide/design-principles.md). Treat it as the target architecture even where existing code differs. Existing code contains compatibility paths, prototypes, and older patterns; repetition alone does not make a pattern preferred. + +Apply this checklist to every change: + +- Reconcile from current state; assume events may be duplicated, reordered, or lost. +- Make external effects idempotent, retryable, context-aware, and recoverable after restart. +- Separate desired state, observed state, one-shot operations, events, logs, and audit records. +- Use a Spec switch for a durable desired state, not an edge-triggered command. Model non-repeatable one-shot actions as identifiable operations. +- Treat `ObservedGeneration` as a controller contract for Spec-driven conditions, not an API-server guarantee; consumers must detect stale conditions according to their semantics. +- Define field and resource ownership explicitly; never adopt, mutate, or delete an object whose ownership cannot be proven. +- Use stable business IDs for long-lived identity and Kubernetes UIDs for object-instance identity; do not substitute names or labels for either. +- Preserve compatibility by reading legacy forms and writing one canonical form. Never silently adopt ambiguous legacy data or mutate cached objects while normalizing API responses. +- Prefer Kubernetes-native APIs and typed, validated contracts. Do not expose unsupported capabilities as stable APIs. +- Enforce tenant and authorization boundaries server-side at every entry point. Client-side filtering is not a security boundary. +- Keep Tenant identity independent from Namespace placement in the core model; an upper layer may still configure an explicit one-to-one mapping. +- Inject external dependencies through small interfaces and constructors; avoid hidden globals, untyped placeholders, and constructor side effects. +- Preserve error chains and domain semantics; reject invalid input rather than silently ignoring it. +- Keep logs, metrics, resource events, conditions, and audit events in their distinct roles; never expose secrets or use unbounded metric labels. +- Add failure-path and recovery tests. Update both English and Chinese documentation for user-facing behavior. + +When local code conflicts with these principles, preserve required compatibility but move new code toward the documented target. Do not copy an older pattern without first establishing why it is still required. + +--- + +## Documentation synchronization + +Documentation is part of the implementation, not a follow-up task. When developing or changing a feature, update the corresponding documentation in the same change so the documented contract never knowingly lags behind the code. + +Apply this workflow to every feature, fix, refactor, deprecation, configuration change, and operational behavior change: + +1. **Map documentation before editing code.** Search for the affected resource, API route, flag, configuration field, UI flow, controller lifecycle, error behavior, deployment step, and example. Identify the authoritative English page and its Chinese counterpart, plus any README, architecture, API reference, example manifest, or generated reference affected by the change. +2. **Treat current behavior and supported scope precisely.** Update capability matrices, prerequisites, defaults, lifecycle semantics, failure and recovery behavior, security implications, and known limitations. Do not document planned, scaffolded, preview, or partially implemented behavior as stable support. +3. **Update docs during implementation.** Make documentation edits in the same working session and commit as the code and tests. Do not defer them to a future issue or wait until the feature is otherwise complete. +4. **Keep English and Chinese synchronized.** When paired pages exist under `apps/rlark/docs/` and `apps/rlark/docs/zh/`, update both with equivalent semantics, examples, warnings, and limitations. A translation may be phrased naturally, but it must not describe a different contract. +5. **Keep examples executable and canonical.** Update commands, YAML/JSON examples, image references, field names, status values, and migration instructions. New examples must use supported APIs and canonical fields; do not add deprecated compatibility fields to new examples. +6. **Update generated documentation at its source.** If a reference is generated from CRDs, protobufs, OpenAPI, CLI metadata, or another source, change the authoritative source and regenerate the output. Do not hand-edit generated artifacts as the only fix. +7. **Validate documentation with behavior.** Run applicable documentation builds, link checks, schema/example validation, and the feature tests whose behavior the documentation describes. Screenshots or mock data never substitute for backend validation. + +Documentation is required even when a change is not a new end-user feature if it changes any externally relevant or operator/developer-observable behavior, including: + +- API, CRD, protobuf, SDK, CLI, or configuration contracts; +- defaults, validation, authorization, tenancy, ownership, finalizers, or status/condition semantics; +- deployment topology, image requirements, certificates, ports, storage, networking, upgrade, rollback, or recovery procedures; +- UI workflows, labels, actions, states, errors, or capability visibility; +- supported runtime/workload/device matrices and known limitations; +- logs, metrics, events, audit behavior, health endpoints, and troubleshooting guidance; +- internal architecture boundaries that contributor or provider documentation promises. + +A change is not complete when the code and tests pass but relevant documentation is stale. Before finishing, explicitly report which documentation files were updated. If a change truly has no documentation impact, state why in the final summary; never silently omit documentation because the change was described as a refactor or bug fix. --- ## Code structure -- **`api/`** -- CRD type definitions (`rlinf.io/v1alpha1`) + generated Kubernetes client code (`kubeclients/`) + code generation scripts (`hack/`). +- **`api/`** -- CRD type definitions (`rlinf.io/v1alpha1`), generated Kubernetes clients (`kubeclients/`), manifests, and generation scripts. Treat `api/rlark.io/v1alpha1/groupversion_info.go` as the authoritative registered type list. - **`apps/rlark/`** -- Main Go project (control plane + data plane agents): - - `cmd/` -- Entry points: `server/`, `gateway/`, `controller-manager/`, `agent/`, `network-sidecar/`, `rlarkadm/`, `rlarkctl/`, `crd-api-docgen/`. - - `pkg/` -- Core logic: `server/`, `gateway/`, `agent/`, `controllermanager/`, `network/`, `auth/`, `db/`, `log/`, `metrics/`, `rlarkadm/`, `rlarkctl/`, `addons/`, `apis/`, `configs/`, `utils/`. -- **`apps/embodied-runtime/`** -- Embodied runtime: manages robot (ROS) and camera hardware on edge nodes via Kubernetes Device Plugin. - - `cmd/` -- `device-plugin/`, `ros-controller/`, `camera-controller/`, `rosctr/`, `camctr/`. - - `pkg/` -- `deviceplugin/`, `roscontroller/`, `cameracontroller/`, `cli/`. + - `cmd/` -- Service, CLI, tooling, and generation entry points. Check this directory and `apps/rlark/Makefile` for the current set and default build targets. + - `pkg/` -- Implementation packages for control-plane services, agents, networking, authentication, persistence, tenancy, distribution, remote access, logging, metrics, administration, and shared utilities. This list is intentionally non-exhaustive; the directory is authoritative. +- **`apps/embodied-runtime/`** -- Device plugins and controllers for camera, ROS, and ROS 2 integrations, plus supporting initialization, webhook, networking, protocol, and CLI packages. Check its `cmd/`, `pkg/`, and Makefile for the current component set. - **`apps/rlark-ui/`** -- Frontend management UI: React + TypeScript + Vite. Nginx serves static files and proxies `/api/` to Gateway. - **`sdks/embodied-runtime-go/`** -- Go SDK for embodied-runtime gRPC stubs. - **`sdks/embodied-runtime-python/`** -- Python SDK for embodied-runtime (RobotClient / CameraClient). @@ -27,27 +77,30 @@ Brief for AI coding agents working on RLark. For full contribution flow, code st ### Control Plane -The control plane runs on **kcp** (a lightweight Kubernetes API server) and consists of: +The control plane uses a Kubernetes-compatible management API. Deployment can include **kcp** or use a configured Kubernetes API. Its main components are: 1. **Server** -- Central hub: HTTPS API for Gateway, SSH server for Agent tunnels, reverse proxy to agents, X.509 + SSH certificate management. 2. **Gateway** -- REST API gateway: exposes CRD operations, auth, storage, cluster, and job log endpoints. Proxies requests to agents via Server. -3. **Controller Manager** -- Reconciles CRDs: Job controller splits Jobs into Tasks and drives state machines; Domain/Node/Workflow controllers manage resource lifecycle. +3. **Controller Manager** -- Runs reconcilers for resources including Domain, Node, Job, Task, and Workflow, plus replication and optional persistence synchronization. Maturity varies by controller; inspect the relevant implementation and tests before relying on a lifecycle behavior. 4. **Web UI (Nginx)** -- Serves the React frontend, proxies `/api/` requests to Gateway. ### Data Plane -Each data plane cluster runs an **Agent** with two modes: +Each Kubernetes data plane runs an **Agent** in `cluster`, `node`, or `both` mode: + +- **Cluster Agent** (typically a Deployment) -- Reconciles control-plane Tasks into local Kubernetes workloads such as Deployments, DaemonSets, and StatefulSets; synchronizes Addons and related delivery resources; and reports observed Pod and Node state. +- **Node Agent** (typically a DaemonSet) -- Runs node-scoped services including NodeServer routing, network support, image pre-pulling and event reporting, and health/metrics endpoints. -- **Cluster Agent** (Deployment) -- Pull controllers: syncs control plane CRs to local K8s resources (Jobs → Pods, ConfigMaps, PVCs). Push controllers: reports local K8s state back to control plane. -- **Node Agent** (DaemonSet) -- Node-level network operations: SSH tunnel setup for cross-cluster Pod networking. +Docker and Raw types and deployment scaffolding exist, but their workload-runtime paths are not implemented. Do not infer support from a type, flag, or deployment option alone. ### Cross-Cluster Networking -Pods communicate across clusters via a virtual network: -1. Sidecar (TUN device + gVisor netstack) intercepts Pod traffic. -2. NodeServer makes routing decisions based on DomainPeer CRs. -3. SSHDialer establishes SSH tunnels between clusters. -4. Traffic flows through the tunnel without NAT traversal. +The Kubernetes networking path works as follows: + +1. A privileged workload sidecar uses a TUN device and gVisor netstack to intercept Pod traffic. +2. NodeServer makes routing decisions from Domain and DomainPeer information. +3. Same-cluster routes may use direct connectivity; cross-cluster routes can be relayed through SSH connections to the control-plane Server. +4. The relay avoids requiring direct inbound reachability between data-plane clusters; do not describe it as a general-purpose NAT traversal mechanism or assume every runtime supports it. --- @@ -58,70 +111,96 @@ Pods communicate across clusters via a virtual network: make build # Build specific components -make build-server -make build-gateway -make build-controller-manager -make build-agent -make build-network-sidecar -make build-rlarkadm +make -C apps/rlark server +make -C apps/rlark gateway +make -C apps/rlark controller-manager +make -C apps/rlark agent +make -C apps/rlark network-sidecar +make -C apps/rlark rlarkadm # Build embodied-runtime make -C apps/embodied-runtime build -# Generate proto code +# Generate proto code (requires the pinned toolchain, see below) +make protoc-install make proto # Build Docker images -make docker-build -make docker-build-ui - -# Lint -make lint -make -C apps/rlark-ui lint +make docker-build-rlark +make docker-build-rlark-ui +make docker-build-embodied-runtime + +# Lint and test repository-supported suites +make lint-go +make lint-web +make test-go +make test-web ``` +### Proto toolchain is pinned — never generate with a different version + +The gRPC stubs under `sdks/embodied-runtime-go/gen`, `sdks/embodied-runtime-python/embodied_runtime/gen`, and `sdks/execution-go/gen` are checked in and record the generator version in every file header. Generating with a locally installed `protoc` or plugin of a different version rewrites all of them and produces a huge, meaningless diff. + +- `proto/toolchain.mk` is the single source of truth for `protoc`, `protoc-gen-go`, `protoc-gen-go-grpc`, and `buf`. `sdks/embodied-runtime-python/requirements-dev.txt` pins `grpcio-tools`. +- Do not use whatever `protoc` is on `PATH`. Run `make protoc-install` to download the pinned release into the gitignored, repository-local `proto/bin` directory; Go plugins and `buf` are installed there automatically with version-stamped names. `proto/bin/protoc` then takes precedence over `PATH`. +- `make proto` runs `protoc-check` first and fails on a version mismatch. Fix the toolchain; never relax a pin or edit generated files by hand to make the check or the diff go away. +- If `python3` is not the interpreter holding the pinned `grpcio-tools`, create a throwaway virtualenv and pass `make proto PYTHON=/path/to/venv/bin/python`. Do not install the pin globally and do not change the pin. +- Bumping a pin is a deliberate change: update `proto/toolchain.mk` (and the Python pins), regenerate every stub tree, and verify with `make verify-proto-generated` in the same commit. + +Details: [Protobuf stubs and the pinned toolchain](apps/rlark/docs/developer-guide/local-development.md#protobuf-stubs-and-the-pinned-toolchain). + ### Running locally ```bash -# Start control plane -./bin/server --kubeconfig ~/.kube/config --port 8443 -./bin/gateway --port 8080 --server-address localhost:8443 -./bin/controller-manager --kubeconfig ~/.kube/config - -# Start data plane agent -./bin/agent --kubeconfig ~/.kube/config --server-url https://localhost:8443 +# Binaries are written under apps/rlark/bin. These examples require a usable +# management API, certificates, and any component-specific dependencies. +./apps/rlark/bin/server --kubeconfig ~/.kube/config --https-port 8443 +./apps/rlark/bin/gateway --kubeconfig ~/.kube/config --addr=:8080 --server-address=https://localhost:8443 +./apps/rlark/bin/controller-manager --kubeconfig ~/.kube/config --leader-election=false + +# Start a Kubernetes cluster agent with credentials issued by the control plane +./apps/rlark/bin/agent \ + --mode=cluster \ + --kubeconfig ~/.kube/config \ + --server-address=https://localhost:8443 \ + --ca-cert /path/to/ca.crt \ + --client-cert /path/to/client.crt \ + --client-key /path/to/client.key ``` +Use `--mode=node` or `--mode=both` when node-scoped services are required. Treat each command's `--help`, its config type, and the relevant Makefile as authoritative because flags and component prerequisites evolve. + ### Deployment ```bash -# Deploy control plane to K8s cluster -./bin/rlarkadm install -f apps/rlark/docs/examples/deploy-control-plane.yaml +# Copy and edit the examples first; replace images, addresses, credentials, +# certificates, storage, and cluster-specific values. +./apps/rlark/bin/rlarkadm install -f apps/rlark/docs/examples/deploy-control-plane.yaml # Deploy data plane agent -./bin/rlarkadm install -f apps/rlark/docs/examples/deploy-data-plane.yaml +./apps/rlark/bin/rlarkadm install -f apps/rlark/docs/examples/deploy-data-plane.yaml ``` --- ## Key concepts -- **Domain** -- A security domain representing a physical or logical cluster boundary. Each domain has its own X.509 certificate. -- **Node** -- A compute node (GPU server, edge device, robot) within a Domain. Supports `unschedulable` for cordon/uncordon. -- **Job** -- A training job composed of multiple Tasks with DAG dependencies. -- **Task** -- A single workload unit (e.g., a Ray head or worker). Supports PVC mounting via `pvcStorageMap`. -- **Workflow** -- A DAG of Job templates for complex training pipelines. -- **DomainPeer** -- Defines cross-cluster network connectivity between two Domains. +- **Domain** -- A logical grouping and addressing boundary in RLark's virtual network. It is not by itself a complete security-isolation boundary. +- **Node** -- A representation of compute capacity associated with a Domain. Its Spec includes `unschedulable`; observed state is primarily synchronized by Agents, and lifecycle behavior must be verified against the implemented reconciler. +- **Job** -- A workload composed of one or more Task templates. +- **Task** -- A single workload unit described by a runtime-specific spec. For Kubernetes, use the Pod template and Kubernetes-native volume APIs. `pvcStorageMap` and `pvcSizeGbMap` are deprecated compatibility fields and must not be used in new APIs or examples. +- **Workflow** -- A DAG of Job templates; dependencies are between Jobs in a Workflow, not between Task templates in a Job. +- **DomainPeer** -- A namespaced, data-plane-facing view of Domain routing and connection information; it is not merely a binary edge between exactly two Domains. --- ## Style and contributing -- **Go**: Follow [Effective Go](https://go.dev/doc/effective_go) and standard Go conventions. Run `make lint` before committing. -- **TypeScript/React**: Follow standard React conventions. Run `make -C apps/rlark-ui lint` before committing. +- **Go**: Follow [Effective Go](https://go.dev/doc/effective_go) and standard Go conventions. Run `make lint-go` before committing. +- **TypeScript/React**: Follow standard React conventions. Run `make lint-web` before committing. - **Commits**: [Conventional Commits](https://www.conventionalcommits.org/) format. Every commit must include `Signed-off-by:` (use `git commit -s`). - **PRs**: Same title format as commits. Fill in the PR template. Link related issues. -- **Tests**: New features should include tests where applicable. Go tests use standard `go test`. -- **Docs**: All user-facing changes must include documentation updates. Both EN and CN versions should be kept in sync. +- **Tests**: New behavior must include relevant tests, including failure and recovery paths for reconciliation and external effects. Use focused package tests while developing, then run `make test-go` and/or `make test-web` as applicable. If a test cannot reasonably be added, document the reason explicitly. +- **Docs**: All user-facing changes must include documentation updates. When corresponding pages exist, keep the English and Chinese versions synchronized. Full details: [CONTRIBUTING.md](CONTRIBUTING.md). diff --git a/Makefile b/Makefile index ba87d2f..789e141 100644 --- a/Makefile +++ b/Makefile @@ -12,36 +12,44 @@ endif ##@ Code style -.PHONY: lint-go lint-web fmt-go fmt-web +.PHONY: lint-go lint-web lint-proto fmt-go fmt-web lint-go: ## Lint all Go projects (golangci-lint) $(MAKE) -C api lint $(MAKEOVERRIDES) $(MAKE) -C apps/rlark lint $(MAKEOVERRIDES) $(MAKE) -C apps/embodied-runtime lint $(MAKEOVERRIDES) $(MAKE) -C sdks/embodied-runtime-go lint $(MAKEOVERRIDES) + $(MAKE) -C sdks/execution-go lint $(MAKEOVERRIDES) + $(MAKE) -C test/e2e lint $(MAKEOVERRIDES) lint-web: ## Lint web UI (eslint) $(MAKE) -C apps/rlark-ui lint $(MAKEOVERRIDES) +lint-proto: ## Lint protobuf definitions (buf lint) + $(MAKE) -C proto/embodied-runtime lint-proto $(MAKEOVERRIDES) + $(MAKE) -C proto/execution lint-proto $(MAKEOVERRIDES) + fmt-go: ## Format all Go projects (gofmt) $(MAKE) -C api fmt $(MAKEOVERRIDES) $(MAKE) -C apps/rlark fmt $(MAKEOVERRIDES) $(MAKE) -C apps/embodied-runtime fmt $(MAKEOVERRIDES) $(MAKE) -C sdks/embodied-runtime-go fmt $(MAKEOVERRIDES) + $(MAKE) -C sdks/execution-go fmt $(MAKEOVERRIDES) + $(MAKE) -C test/e2e fmt $(MAKEOVERRIDES) fmt-web: ## Format web UI (prettier) $(MAKE) -C apps/rlark-ui fmt $(MAKEOVERRIDES) ##@ Go targets -.PHONY: build test-go test-web go-tidy +.PHONY: build test-go test-web test-e2e test-e2e-rlark go-tidy build: ## Build all binaries (apps/rlark) $(MAKE) -C apps/rlark build $(MAKEOVERRIDES) test-go: ## Run Go unit tests with coverage @mkdir -p coverage/go - @for module in api apps/rlark apps/embodied-runtime; do \ + @for module in api apps/rlark apps/embodied-runtime test/e2e; do \ name=$$(echo $$module | tr '/' '-'); \ coverage=$$(cd $$module && realpath --relative-to=. $(CURDIR)/coverage/go/$$name.out); \ (cd $$module && go test ./... -v -count=1 -short -covermode=atomic -coverprofile=$$coverage) || exit $$?; \ @@ -51,6 +59,11 @@ test-web: ## Run web UI unit tests with coverage npm ci --prefix apps/rlark-ui npm run test:coverage --prefix apps/rlark-ui +test-e2e: test-e2e-rlark ## Run all implemented end-to-end suites + +test-e2e-rlark: ## Provision Kind, deploy RLark, run smoke tests, collect evidence, and clean up + $(MAKE) -C test/e2e test-rlark $(MAKEOVERRIDES) + go-tidy: ## Run go mod tidy on all workspace modules @for dir in $$( $(GREP) '^\t\./' go.work | sed 's/^\t//' ); do \ echo "Running go mod tidy in $$dir"; \ @@ -59,9 +72,9 @@ go-tidy: ## Run go mod tidy on all workspace modules ##@ Code generation -.PHONY: generate generate-crd generate-crd-schema-docs proto +.PHONY: generate generate-crd generate-crd-schema-docs generate-web-models verify-generated proto proto-embodied-runtime proto-execution protoc-install proto-breaking verify-proto-generated -generate: generate-crd-schema-docs ## Generate CRD manifests, clients, and schema docs +generate: generate-crd-schema-docs generate-web-models ## Generate CRD manifests, clients, docs, and web models generate-crd: ## Generate CRD manifests and clients $(MAKE) -C api generate-crd $(MAKEOVERRIDES) @@ -69,9 +82,49 @@ generate-crd: ## Generate CRD manifests and clients generate-crd-schema-docs: generate-crd ## Generate CRD schema reference docs go run ./apps/rlark/cmd/crd-api-docgen api/config/crd/bases apps/rlark/docs/reference/crd.md -proto: ## Generate protobuf stubs +generate-web-models: generate-crd ## Generate TypeScript models from CRD manifests + npm ci --prefix apps/rlark-ui + npm run generate:crd-models --prefix apps/rlark-ui + +GENERATED_PATHS = api/config/crd/bases api/kubeclients 'api/rlark.io/**/zz_generated.deepcopy.go' apps/rlark/docs/reference/crd.md apps/rlark-ui/src/generated/rlark + +verify-generated: ## Fail if generated code/manifests/docs are out of date + @$(MAKE) generate $(MAKEOVERRIDES) + @if ! git diff --exit-code --stat -- $(GENERATED_PATHS); then \ + echo ""; \ + echo "ERROR: generated artifacts are out of date."; \ + echo "The CRD manifests, deepcopy funcs, typed Go/TypeScript clients, or CRD reference docs"; \ + echo "do not match the Go types in api/rlark.io/. Run 'make generate' and"; \ + echo "commit the result."; \ + exit 1; \ + fi + @if [ -n "$$(git ls-files --others --exclude-standard -- $(GENERATED_PATHS))" ]; then \ + echo ""; \ + echo "ERROR: 'make generate' produced untracked files:"; \ + git ls-files --others --exclude-standard -- $(GENERATED_PATHS); \ + echo "Commit them or remove the stale sources that produce them."; \ + exit 1; \ + fi + +proto: proto-embodied-runtime proto-execution ## Generate all protobuf stubs + +proto-embodied-runtime: ## Generate embodied-runtime protobuf stubs $(MAKE) -C proto/embodied-runtime proto $(MAKEOVERRIDES) +proto-execution: ## Generate execution protobuf stubs + $(MAKE) -C proto/execution proto $(MAKEOVERRIDES) + +protoc-install: ## Download the pinned protoc release into proto/bin + $(MAKE) -C proto/embodied-runtime protoc-install $(MAKEOVERRIDES) + +verify-proto-generated: ## Fail if the checked-in gRPC stubs are out of date + $(MAKE) -C proto/embodied-runtime verify-proto-generated $(MAKEOVERRIDES) + $(MAKE) -C proto/execution verify-proto-generated $(MAKEOVERRIDES) + +proto-breaking: ## Fail if protobuf changes break the published gRPC contract + $(MAKE) -C proto/embodied-runtime proto-breaking $(MAKEOVERRIDES) + $(MAKE) -C proto/execution proto-breaking $(MAKEOVERRIDES) + ##@ Docker .PHONY: docker-build docker-push-rlark docker-build-ui docker-push-rlark-ui docker-build-embodied-runtime docker-push-embodied-runtime diff --git a/api/Makefile b/api/Makefile index e8f8c00..d11d72a 100644 --- a/api/Makefile +++ b/api/Makefile @@ -1,4 +1,16 @@ -CONTROLLER_GEN ?= $(shell go env GOPATH)/bin/controller-gen +# Pinned code generator. The CRD manifests and deepcopy funcs are checked in and +# record this version in their headers, so every environment must use the same +# pin or the next regeneration rewrites every generated file. +CONTROLLER_TOOLS_VERSION ?= v0.18.0 + +# The generator is installed into the gitignored, repository-local api/bin under +# a version-stamped file name. A shared GOPATH/bin is not usable here: CI shares +# it across jobs and projects, so a file named `controller-gen` may be stale or +# not even executable while make still treats the install target as satisfied +# and skips the install, which then fails mid-generation with exit code 127. +LOCALBIN ?= $(CURDIR)/bin +CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen-$(CONTROLLER_TOOLS_VERSION) + CRD_DIR ?= config/crd/bases SAMPLES_DIR ?= config/samples @@ -27,14 +39,20 @@ test: ## Run tests ##@ Code generation .PHONY: generate-manifests generate-clients generate-crd samples clean-samples +.PHONY: controller-gen print-controller-gen + +controller-gen: $(CONTROLLER_GEN) ## Install the pinned controller-gen into api/bin + +print-controller-gen: ## Print the path of the pinned controller-gen + @echo $(CONTROLLER_GEN) generate-manifests: $(CONTROLLER_GEN) ## Generate CRD YAML manifests mkdir -p $(CRD_DIR) $(CONTROLLER_GEN) object paths=./rlark.io/... - $(CONTROLLER_GEN) crd:allowDangerousTypes=true paths=./rlark.io/... output:crd:artifacts:config=$(CRD_DIR) + $(CONTROLLER_GEN) crd:allowDangerousTypes=true,generateEmbeddedObjectMeta=true paths=./rlark.io/... output:crd:artifacts:config=$(CRD_DIR) -generate-clients: ## Generate typed clients, informers, listers - ./hack/generate-clients.sh --with-watch +generate-clients: | $(LOCALBIN) ## Generate typed clients, informers, listers + GOBIN=$(LOCALBIN) ./hack/generate-clients.sh --with-watch generate-crd: generate-manifests generate-clients ## Generate CRD manifests and clients @@ -44,8 +62,17 @@ samples: ## Verify sample CRs exist clean-samples: ## Remove sample CRs rm -rf $(SAMPLES_DIR) -$(CONTROLLER_GEN): - GOBIN=$(shell go env GOPATH)/bin go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.18.0 +$(LOCALBIN): + mkdir -p $(LOCALBIN) + +# `go install` writes an unversioned name, so rename it to the version-stamped +# path make depends on. The final `--version` call is the executability check: +# if the installed file cannot be executed the install fails here instead of +# much later, in the middle of generation. +$(CONTROLLER_GEN): | $(LOCALBIN) + GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) + mv $(LOCALBIN)/controller-gen $@ + $@ --version ##@ Help diff --git a/api/config/crd/bases/rlinf.io_addons.yaml b/api/config/crd/bases/rlinf.io_addons.yaml index a99a493..de89253 100644 --- a/api/config/crd/bases/rlinf.io_addons.yaml +++ b/api/config/crd/bases/rlinf.io_addons.yaml @@ -66,6 +66,7 @@ spec: status: properties: conditions: + description: Conditions 记录 Addon 的结构化状态结论,当前仅包含 ConditionTypeReady。 items: description: Condition contains details for one aspect of the current state of this API Resource. @@ -121,9 +122,28 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map message: type: string + observedGeneration: + description: |- + ObservedGeneration 是 Addon 控制器最近一次完成调谐时所观测到的 + metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + format: int64 + type: integer phase: + description: |- + AddonPhase 是 Addon 安装与升级流程的聚合阶段,由数据面 Agent 观测后上报。 + 取值集合在 CRD Schema 层封闭,新增取值必须同步更新枚举校验与文档。 + enum: + - Pending + - Installing + - Ready + - Failed + - Upgrading type: string version: type: string diff --git a/api/config/crd/bases/rlinf.io_clusters.yaml b/api/config/crd/bases/rlinf.io_clusters.yaml new file mode 100644 index 0000000..9b3bbcc --- /dev/null +++ b/api/config/crd/bases/rlinf.io_clusters.yaml @@ -0,0 +1,157 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: clusters.rlinf.io +spec: + group: rlinf.io + names: + kind: Cluster + listKind: ClusterList + plural: clusters + shortNames: + - rlcluster + singular: cluster + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .status.onlineNodes + name: Online + type: integer + - jsonPath: .status.totalNodes + name: Total + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: ClusterSpec declares the durable operational state of a data-plane + cluster. + properties: + agentNamespace: + description: AgentNamespace is the management-plane namespace that + contains the agent heartbeat Lease and Node CRs. + type: string + cordoned: + type: boolean + draining: + type: boolean + required: + - agentNamespace + type: object + status: + description: ClusterStatus reports the controller's current observation + of a data-plane cluster. + properties: + conditions: + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + lastHeartbeatTime: + format: date-time + type: string + onlineNodes: + format: int32 + type: integer + phase: + description: |- + ClusterPhase summarizes the current lifecycle state of a data-plane cluster. + The set is closed in the CRD schema: adding a value requires updating the + enum marker, regenerating the CRD manifests, and updating the documentation. + enum: + - Online + - Offline + - Downgraded + - Cordoned + - Draining + type: string + totalNodes: + format: int32 + type: integer + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/api/config/crd/bases/rlinf.io_domainpeers.yaml b/api/config/crd/bases/rlinf.io_domainpeers.yaml index 8db6fc7..83da31b 100644 --- a/api/config/crd/bases/rlinf.io_domainpeers.yaml +++ b/api/config/crd/bases/rlinf.io_domainpeers.yaml @@ -17,9 +17,9 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .spec.domain - name: Domain - type: string + - jsonPath: .spec.prefixLen + name: PrefixLen + type: integer - jsonPath: .metadata.creationTimestamp name: Age type: date diff --git a/api/config/crd/bases/rlinf.io_domains.yaml b/api/config/crd/bases/rlinf.io_domains.yaml index 987e695..e5ddd77 100644 --- a/api/config/crd/bases/rlinf.io_domains.yaml +++ b/api/config/crd/bases/rlinf.io_domains.yaml @@ -17,6 +17,9 @@ spec: scope: Cluster versions: - additionalPrinterColumns: + - jsonPath: .spec.cidr + name: CIDR + type: string - jsonPath: .metadata.creationTimestamp name: Age type: date @@ -48,7 +51,72 @@ spec: type: object status: properties: + conditions: + description: |- + Conditions 记录 Domain 的结构化状态结论,当前仅包含 ConditionTypeValidated + (Spec.CIDR 是否合法)。它由 Spec 驱动,写入方必须填写 ObservedGeneration。 + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map ipAllocations: + description: |- + IPAllocations 由 Domain 控制器独占写入,其它组件不得修改。该列表规模随 + Domain CIDR 增长(/16 可达数万条)。 items: properties: ip: @@ -61,6 +129,13 @@ spec: type: string type: object type: array + observedGeneration: + description: |- + ObservedGeneration 是 Domain 控制器最近一次完成调谐时所观测到的 + metadata.generation。它是控制器契约而非 API Server 保证:消费者在依据 + ipAllocations 做判断前,应比较本字段与 metadata.generation 以识别过期状态。 + format: int64 + type: integer type: object type: object served: true diff --git a/api/config/crd/bases/rlinf.io_jobs.yaml b/api/config/crd/bases/rlinf.io_jobs.yaml index 7873edc..5a7271c 100644 --- a/api/config/crd/bases/rlinf.io_jobs.yaml +++ b/api/config/crd/bases/rlinf.io_jobs.yaml @@ -50,14 +50,20 @@ spec: type: string sshPublicKey: type: string - stopped: + suspended: + description: Setting spec.suspended to true starts an orderly stop + without deleting the Job resource. The Job becomes Stopped and is + archived into the persistence backend after ArchiveTTL (default + 5 minutes), while the Job CR is deleted from kcp. Starting the Job + via POST /jobs/:name/start restores it from the persistence backend + with the same name and spec but a new Kubernetes UID. type: boolean tags: items: description: |- JobTag 表示一个任务标签,由 key 和多个 value 组成。 - key 和每个 value 长度均不超过 10 个字符;一个任务最多 10 个标签; - 每个标签最多包含 10 个不同的 value。 + 标签的个数与 key/value 长度上限不在 CRD Schema 层封闭,由 Gateway 在写入 + 路径上校验,详见开发者文档的 API 约定。 properties: key: type: string @@ -73,150 +79,422 @@ spec: tasks: items: properties: - agentType: + downstreamName: + type: string + environments: + items: + description: |- + TaskEnvironment 表示 Task 请求的一种可扩展环境能力。 + Type 是带所有者作用域的稳定类型标识,Version 表示该类型的参数版本。 + Parameters 必须由对应的已注册 Handler 严格解码和校验;未知类型、未知版本或 + 非法参数必须在产生任何外部副作用前被拒绝。 + properties: + parameters: + x-kubernetes-preserve-unknown-fields: true + type: + type: string + version: + type: string + required: + - type + - version + type: object + type: array + head: + type: boolean + name: type: string - docker: + placement: + description: TaskPlacementSpec describes scheduling constraints + for the workload. properties: - containers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - environment: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - image: - type: string - name: - type: string - volumes: - items: - properties: - source: - type: string - target: - type: string - type: object - type: array - type: object - type: array + nodeSelector: + additionalProperties: + type: string + type: object type: object - domain: - type: string - downstreamName: + role: + description: |- + TaskRole 描述 Task 在业务编排中的角色,用于前端分组与展示。 + 该字段当前不在 CRD 层做枚举校验:它可能承载上层编排框架的自定义角色名, + 收窄取值会阻止合法的既有数据写入。请勿据此推断取值的封闭集合。 type: string - head: + runtime: + description: |- + TaskRuntimeSpec selects the runtime implementation and instance that lowers + the common Pod template. Name is a stable runtime instance identifier; it is + not a display name or proof of ownership. + properties: + kind: + description: |- + RuntimeKind 表示负责执行 Task 工作负载的 Runtime 类型。 + CRD 有意不限制该字符串的枚举值,使 Docker、Raw 等 Runtime 可以在不修改 + Task Schema 的情况下扩展。Agent 必须在产生任何外部副作用前,通过已注册的 + Provider 和能力校验拒绝未知或尚未支持的 Runtime 类型。 + type: string + name: + type: string + required: + - kind + type: object + suspended: type: boolean - kubernetes: + tags: + items: + description: |- + JobTag 表示一个任务标签,由 key 和多个 value 组成。 + 标签的个数与 key/value 长度上限不在 CRD Schema 层封闭,由 Gateway 在写入 + 路径上校验,详见开发者文档的 API 约定。 + properties: + key: + type: string + values: + items: + type: string + type: array + required: + - key + - values + type: object + type: array + workload: + description: |- + TaskWorkloadSpec is the common workload declaration for every runtime. + Kubernetes applies the Pod template natively. Future Docker and Raw providers + lower the subset they support and reject unsupported fields before producing + external effects. properties: - workload: + carrier: + description: |- + TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a + workload. Type and Version identify a carrier contract; Parameters remain + opaque until the selected Adapter or Runtime implementation strictly decodes + them. Carrier identifiers are open strings, not CRD enums. properties: - kind: + parameters: + x-kubernetes-preserve-unknown-fields: true + type: type: string - pvcSizeGbMap: - additionalProperties: - format: int32 - type: integer - description: 'Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests - instead.' - type: object - pvcStorageMap: - additionalProperties: - type: string - description: 'Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.StorageClassName - instead.' - type: object - replicas: - format: int32 - type: integer - template: - description: PodTemplateSpec describes the data a pod - should have when created from a template + version: + type: string + required: + - type + - version + type: object + kind: + description: |- + WorkloadKind identifies the workload semantics independently of its Runtime + carrier. The CRD deliberately keeps this identifier open; registered + Adapters must reject unsupported kinds before producing external effects. + type: string + parameters: + x-kubernetes-preserve-unknown-fields: true + template: + description: PodTemplateSpec describes the data a pod should + have when created from a template + properties: + metadata: + description: |- + Standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata properties: - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + annotations: + additionalProperties: + type: string type: object - spec: + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: |- + Specification of the desired behavior of the pod. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + activeDeadlineSeconds: description: |- - Specification of the desired behavior of the pod. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling + constraints properties: - activeDeadlineSeconds: - description: |- - Optional duration in seconds the pod may be active on the node relative to - StartTime before the system will actively try to mark it failed and kill associated containers. - Value must be a positive integer. - format: int64 - type: integer - affinity: - description: If specified, the pod's scheduling - constraints + nodeAffinity: + description: Describes node affinity scheduling + rules for the pod. properties: - nodeAffinity: - description: Describes node affinity scheduling - rules for the pod. + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node matches the corresponding matchExpressions; the + node(s) with the highest sum are the most preferred. + items: + description: |- + An empty preferred scheduling term matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector term, + associated with the corresponding + weight. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key + that the selector applies + to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key + that the selector applies + to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with + matching the corresponding nodeSelectorTerm, + in the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from its node. properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. + nodeSelectorTerms: + description: Required. A list of node + selector terms. The terms are ORed. items: description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + A null or empty node selector term matches no objects. The requirements of + them are ANDed. + The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key + that the selector applies + to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key + that the selector applies + to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling + rules (e.g. co-locate this pod in the same + node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the + matched WeightedPodAffinityTerm fields + are added per-node to find the most + preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. properties: - preference: - description: A node selector term, - associated with the corresponding - weight. + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. properties: matchExpressions: - description: A list of node - selector requirements by - node's labels. + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. items: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: The label - key that the selector - applies to. + description: key is + the label key that + the selector applies + to. type: string operator: description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- - An array of string values. If the operator is In or NotIn, + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -227,32 +505,79 @@ spec: type: object type: array x-kubernetes-list-type: atomic - matchFields: - description: A list of node - selector requirements by - node's fields. + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. items: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: The label - key that the selector - applies to. + description: key is + the label key that + the selector applies + to. type: string operator: description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- - An array of string values. If the operator is In or NotIn, + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -263,332 +588,250 @@ spec: type: object type: array x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object x-kubernetes-map-type: atomic - weight: - description: Weight associated - with matching the corresponding - nodeSelectorTerm, in the range - 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of - node selector terms. The terms - are ORed. - items: + namespaces: description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node - selector requirements by - node's labels. - items: + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label - key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node - selector requirements by - node's fields. - items: + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label - key that the selector - applies to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling - rules (e.g. co-locate this pod in the - same node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of - the matched WeightedPodAffinityTerm - fields are added per-node to find - the most preferred node(s) + type: object + x-kubernetes-map-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. properties: - podAffinityTerm: - description: Required. A pod affinity - term, associated with the corresponding - weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label key - that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - 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. - items: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label key - that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling + rules (e.g. avoid putting this pod in the + same node, zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the anti-affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, etc.), + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the + matched WeightedPodAffinityTerm fields + are added per-node to find the most + preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity + term, associated with the corresponding + weight. properties: labelSelector: description: |- @@ -746,621 +989,275 @@ spec: required: - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity - scheduling rules (e.g. avoid putting this - pod in the same node, zone, etc. as some - other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and subtracting - "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of - the matched WeightedPodAffinityTerm - fields are added per-node to find - the most preferred node(s) + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the anti-affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the anti-affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. properties: - podAffinityTerm: - description: Required. A pod affinity - term, associated with the corresponding - weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label key - that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - 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. - items: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label key - that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: + values: description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is - the label key that - the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array x-kubernetes-list-type: atomic - 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. - items: + matchLabels: + additionalProperties: type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is - the label key that - the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - automountServiceAccountToken: - description: AutomountServiceAccountToken indicates - whether a service account token should be - automatically mounted. - type: boolean - containers: - description: |- - List of containers belonging to the pod. - Containers cannot currently be added or removed. - There must be at least one container in a Pod. - Cannot be updated. - items: - description: A single application container - that you want to run within a pod. - properties: - args: - description: |- - 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - env: - description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment - variable present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. + x-kubernetes-map-type: atomic + 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. + items: type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". + type: array + x-kubernetes-list-type: atomic + 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. + items: type: string - valueFrom: - description: Source for the environment - variable's value. Cannot be used - if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of - a ConfigMap. - properties: - key: - description: The key to - select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether - the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of - the schema the FieldPath - is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the - field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + description: key is the + label key that the selector + applies to. type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: + operator: description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The name of - the volume mount containing - the env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container - name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the - output format of the exposed - resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of - a secret in the pod's namespace - properties: - key: - description: The key of - the secret to select from. Must - be a valid secret key. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - name: - default: "" + values: description: |- - 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 - type: string - optional: - description: Specify whether - the Secret or its key - must be defined - type: boolean + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - key + - operator type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource represents - the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select - from - properties: - name: + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates + whether a service account token should be automatically + mounted. + type: boolean + containers: + description: |- + List of containers belonging to the pod. + Containers cannot currently be added or removed. + There must be at least one container in a Pod. + Cannot be updated. + items: + description: A single application container that + you want to run within a pod. + properties: + args: + description: |- + 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if + value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a + ConfigMap. + properties: + key: + description: The key to select. + type: string + name: default: "" description: |- Name of the referent. @@ -1371,19 +1268,106 @@ spec: type: string optional: description: Specify whether - the ConfigMap must be defined + the ConfigMap or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select - from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the + schema the FieldPath is written + in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the + volume mount containing the + env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a + secret in the pod's namespace + properties: + key: + description: The key of the + secret to select from. Must + be a valid secret key. + type: string name: default: "" description: |- @@ -1395,279 +1379,104 @@ spec: type: string optional: description: Specify whether - the Secret must be defined + the Secret or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - 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 and StatefulSets. - type: string - imagePullPolicy: - description: |- - 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 - type: string - lifecycle: - description: |- - Actions that the management system should take in response to container lifecycle events. - Cannot be updated. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a - command to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers - to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom header - to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access - on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the container - should sleep. - properties: - seconds: - description: Seconds is the - number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host - name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a - command to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers - to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom header - to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access - on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the container - should sleep. - properties: - seconds: - description: Seconds is the - number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host - name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the + source of a set of ConfigMaps or Secrets + properties: + configMapRef: + description: The ConfigMap to select + from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the + ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the + Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + 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 and StatefulSets. + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: |- + Actions that the management system should take in response to container lifecycle events. + Cannot be updated. + properties: + postStart: description: |- - Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command @@ -1685,33 +1494,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -1766,27 +1548,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number + of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name @@ -1805,91 +1583,18 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - name: - description: |- - Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: |- - 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. - 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. - items: - description: ContainerPort represents - a network port in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind - the external port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: + preStop: description: |- - Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command @@ -1907,36 +1612,9 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an - HTTP GET request to perform. + httpGet: + description: HTTPGet specifies an + HTTP GET request to perform. properties: host: description: |- @@ -1988,27 +1666,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number + of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name @@ -2027,1005 +1701,1213 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - resizePolicy: + stopSignal: description: |- - Resources resize policy for the container. - This field cannot be set on ephemeral containers. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: |- + Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: description: |- - Compute Resources required by this container. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. properties: - claims: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 + type: integer + service: + default: "" description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. + description: HTTPHeader describes + a custom header to be used in + HTTP probes properties: name: 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. + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + value: + description: The header field + value type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: 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/ - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - restartPolicy: - description: |- - RestartPolicy defines the restart behavior of individual containers in a pod. - This overrides the pod-level restart policy. When this field is not specified, - the restart behavior is defined by the Pod's restart policy and the container type. - Additionally, 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. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. The rules are evaluated in - order. Once a rule matches a container exit condition, the remaining - rules are ignored. If no rule matches the container exit condition, - the Container-level restart policy determines the whether the container - is restarted or not. Constraints on the rules: - - At most 20 rules are allowed. - - Rules can have the same action. - - Identical rules are not forbidden in validations. - When rules are specified, container MUST set RestartPolicy explicitly - even it if matches the Pod's RestartPolicy. - items: - description: ContainerRestartRule describes - how a container exit is handled. - properties: - action: - description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. - type: string - exitCodes: - description: Represents the exit - codes to check on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object - required: - - action - type: object - type: array - x-kubernetes-list-type: atomic - securityContext: + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: description: |- - SecurityContext defines the security options the container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - allowPrivilegeEscalation: - description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: - description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' type: string - readOnlyRootFilesystem: + port: + anyOf: + - type: integer + - type: string description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: |- + 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. + 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. + items: + description: ContainerPort represents a + network port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the + external port to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: |- + Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: + service: + default: "" description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux - level label that applies to - the container. - type: string - role: - description: Role is a SELinux - role label that applies to the - container. - type: string - type: - description: Type is a SELinux - type label that applies to the - container. - type: string - user: - description: User is a SELinux - user label that applies to the - container. - type: string - type: object - seccompProfile: + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - startupProbe: - description: |- - StartupProbe indicates that the Pod has successfully initialized. - If specified, no other probes are executed until this completes successfully. - If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an - HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to - set in the request. HTTP allows - repeated headers. - items: - description: HTTPHeader describes - a custom header to be used - in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on - the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object - stdin: + terminationGracePeriodSeconds: description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list - of block devices to be used by the container. + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: |- + Resources resize policy for the container. + This field cannot be set on ephemeral containers. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Compute Resources required by this container. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. items: - description: volumeDevice describes - a mapping of a raw block device within - a container. + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. properties: - devicePath: - description: devicePath is the path - inside of the container that the - device will be mapped to. - type: string name: - description: name must match the - name of a persistentVolumeClaim - in the pod + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string required: - - devicePath - name type: object type: array x-kubernetes-list-map-keys: - - devicePath + - name x-kubernetes-list-type: map - volumeMounts: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a - mounting of a Volume within a container. + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + RestartPolicy defines the restart behavior of individual containers in a pod. + This overrides the pod-level restart policy. When this field is not specified, + the restart behavior is defined by the Pod's restart policy and the container type. + Additionally, 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. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. The rules are evaluated in + order. Once a rule matches a container exit condition, the remaining + rules are ignored. If no rule matches the container exit condition, + the Container-level restart policy determines the whether the container + is restarted or not. Constraints on the rules: + - At most 20 rules are allowed. + - Rules can have the same action. + - Identical rules are not forbidden in validations. + When rules are specified, container MUST set RestartPolicy explicitly + even it if matches the Pod's RestartPolicy. + items: + description: ContainerRestartRule describes + how a container exit is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the exit codes + to check on container exits. properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the - Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If 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. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: + operator: description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. type: string - subPathExpr: + values: description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set required: - - mountPath - - name + - operator type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + SecurityContext defines the security options the container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + properties: + allowPrivilegeEscalation: description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines - DNS resolver options of a pod. + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + 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. properties: - name: + localhostProfile: description: |- - Name is this DNS resolver option's name. - Required. + 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". type: string - value: - description: Value is this DNS resolver - option's value. + type: + description: |- + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. type: string + required: + - type type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - 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 'ClusterFirstWithHostNet'. - type: string - enableServiceLinks: - description: |- - EnableServiceLinks indicates whether information about services should be injected into pod's - environment variables, matching the syntax of Docker links. - Optional: Defaults to true. - type: boolean - ephemeralContainers: - description: |- - List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing - pod to perform user-initiated actions such as debugging. This list cannot be specified when - creating a pod, and it cannot be modified by updating the pod spec. In order to add an - ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. - items: - description: |- - An EphemeralContainer is a temporary container that you may add to an existing Pod for - user-initiated activities such as debugging. Ephemeral containers have no resource or - scheduling guarantees, and they will not be restarted when they exit or when a Pod is - removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the - Pod to exceed its resource allocation. - - To add an ephemeral container, use the ephemeralcontainers subresource of an existing - Pod. Ephemeral containers may not be removed or restarted. - properties: - args: - description: |- - Arguments to the entrypoint. - The 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - Entrypoint array. Not executed within a shell. - The 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - env: + capabilities: description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment - variable present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent + POSIX capabilities type type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability represent + POSIX capabilities type type: string - valueFrom: - description: Source for the environment - variable's value. Cannot be used - if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of - a ConfigMap. - properties: - key: - description: The key to - select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether - the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of - the schema the FieldPath - is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the - field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. - type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The name of - the volume mount containing - the env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level + label that applies to the container. + type: string + role: + description: Role is a SELinux role + label that applies to the container. + type: string + type: + description: Type is a SELinux type + label that applies to the container. + type: string + user: + description: User is a SELinux user + label that applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: |- + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: |- + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA credential + spec to use. + type: string + hostProcess: + description: |- + HostProcess determines if a container should be run as a 'Host 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. + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + startupProbe: + description: |- + StartupProbe indicates that the Pod has successfully initialized. + If specified, no other probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + when it might take a long time to load data or warm a cache, than during steady-state operation. + This cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container - name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the - output format of the exposed - resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of - a secret in the pod's namespace - properties: - key: - description: The key of - the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether - the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field + value + type: string + required: + - name + - value type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource represents - the source of a set of ConfigMaps - or Secrets + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of + block devices to be used by the container. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path + inside of the container that the device + will be mapped to. + type: string + name: + description: name must match the name + of a persistentVolumeClaim in the + pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match the Name + of a Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. + + If ReadOnly is false, this field has no meaning and must be unspecified. + + If 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. + + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). + + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + dnsConfig: + description: |- + Specifies the DNS parameters of a pod. + Parameters specified here will be merged to the generated DNS + configuration based on DNSPolicy. + properties: + nameservers: + description: |- + A list of DNS name server IP addresses. + This will be appended to the base nameservers generated from DNSPolicy. + Duplicated nameservers will be removed. + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + description: |- + A list of DNS resolver options. + This will be merged with the base options generated from DNSPolicy. + Duplicated entries will be removed. Resolution options given in Options + will override those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS + resolver options of a pod. + properties: + name: + description: |- + Name is this DNS resolver option's name. + Required. + type: string + value: + description: Value is this DNS resolver + option's value. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + description: |- + A list of DNS search domains for host-name lookup. + This will be appended to the base search paths generated from DNSPolicy. + Duplicated search paths will be removed. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + 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 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: |- + EnableServiceLinks indicates whether information about services should be injected into pod's + environment variables, matching the syntax of Docker links. + Optional: Defaults to true. + type: boolean + ephemeralContainers: + description: |- + List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + pod to perform user-initiated actions such as debugging. This list cannot be specified when + creating a pod, and it cannot be modified by updating the pod spec. In order to add an + ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + items: + description: |- + An EphemeralContainer is a temporary container that you may add to an existing Pod for + user-initiated activities such as debugging. Ephemeral containers have no resource or + scheduling guarantees, and they will not be restarted when they exit or when a Pod is + removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the + Pod to exceed its resource allocation. + + To add an ephemeral container, use the ephemeralcontainers subresource of an existing + Pod. Ephemeral containers may not be removed or restarted. + properties: + args: + description: |- + Arguments to the entrypoint. + The 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + Entrypoint array. Not executed within a shell. + The 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if + value is not empty. properties: - configMapRef: - description: The ConfigMap to select - from + configMapKeyRef: + description: Selects a key of a + ConfigMap. properties: + key: + description: The key to select. + type: string name: default: "" description: |- @@ -3037,297 +2919,212 @@ spec: type: string optional: description: Specify whether - the ConfigMap must be defined + the ConfigMap or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select - from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: - name: - default: "" + apiVersion: + description: Version of the + schema the FieldPath is written + in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: description: |- - 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 + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. type: string optional: - description: Specify whether - the Secret must be defined + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the + volume mount containing the + env file. + type: string + required: + - key + - path + - volumeName type: object x-kubernetes-map-type: atomic - type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - Container image name. - More info: https://kubernetes.io/docs/concepts/containers/images - type: string - imagePullPolicy: + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a + secret in the pod's namespace + properties: + key: + description: The key of the + secret to select from. Must + be a valid secret key. + type: string + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether + the Secret or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the + source of a set of ConfigMaps or Secrets + properties: + configMapRef: + description: The ConfigMap to select + from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the + ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the + Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + Container image name. + More info: https://kubernetes.io/docs/concepts/containers/images + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: Lifecycle is not allowed for + ephemeral containers. + properties: + postStart: description: |- - 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 - type: string - lifecycle: - description: Lifecycle is not allowed - for ephemeral containers. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a - command to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers - to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom header - to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access - on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the container - should sleep. - properties: - seconds: - description: Seconds is the - number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host - name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a - command to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers - to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom header - to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access - on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the container - should sleep. - properties: - seconds: - description: Seconds is the - number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host - name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: - description: Probes are not allowed for - ephemeral containers. + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command @@ -3345,33 +3142,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -3426,27 +3196,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number + of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name @@ -3465,81 +3231,18 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - name: + preStop: description: |- - Name of the ephemeral container specified as a DNS_LABEL. - This name must be unique among all containers, init containers and ephemeral containers. - type: string - ports: - description: Ports are not allowed for - ephemeral containers. - items: - description: ContainerPort represents - a network port in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind - the external port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: Probes are not allowed for - ephemeral containers. + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command @@ -3557,33 +3260,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -3638,27 +3314,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number + of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name @@ -3677,1024 +3349,1217 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - resizePolicy: - description: Resources resize policy for - the container. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: + stopSignal: description: |- - Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources - already allocated to the pod. + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: Exec specifies a command + to execute in the container. properties: - claims: + command: description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - 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. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object + type: string type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - 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/ - type: object + x-kubernetes-list-type: atomic type: object - restartPolicy: + failureThreshold: description: |- - Restart policy for the container to manage the restart behavior of each - container within a pod. - You cannot set this field on ephemeral containers. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. You cannot set this field on - ephemeral containers. - items: - description: ContainerRestartRule describes - how a container exit is handled. - properties: - action: - description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. - type: string - exitCodes: - description: Represents the exit - codes to check on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object - required: - - action - type: object - type: array - x-kubernetes-list-type: atomic - securityContext: - description: |- - Optional: SecurityContext defines the security options the ephemeral container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. properties: - allowPrivilegeEscalation: - description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - appArmorProfile: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 + type: integer + service: + default: "" 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent - POSIX capabilities type + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed capabilities - items: - description: Capability represent - POSIX capabilities type + value: + description: The header field + value type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' type: string - readOnlyRootFilesystem: + port: + anyOf: + - type: integer + - type: string description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the ephemeral container specified as a DNS_LABEL. + This name must be unique among all containers, init containers and ephemeral containers. + type: string + ports: + description: Ports are not allowed for ephemeral + containers. + items: + description: ContainerPort represents a + network port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the + external port to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: + service: + default: "" description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux - level label that applies to - the container. - type: string - role: - description: Role is a SELinux - role label that applies to the - container. - type: string - type: - description: Type is a SELinux - type label that applies to the - container. - type: string - user: - description: User is a SELinux - user label that applies to the - container. - type: string - type: object - seccompProfile: + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - startupProbe: - description: Probes are not allowed for - ephemeral containers. + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the + container. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + already allocated to the pod. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an - HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to - set in the request. HTTP allows - repeated headers. - items: - description: HTTPHeader describes - a custom header to be used - in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on - the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - type: object - stdin: - description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - targetContainerName: - description: |- - If set, the name of the container from PodSpec that this ephemeral container targets. - The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. - If not set then the ephemeral container uses the namespaces configured in the Pod spec. + This field depends on the + DynamicResourceAllocation feature gate. - The container runtime must implement support for this feature. If the runtime does not - support namespace targeting then the result of setting this field is undefined. - type: string - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: - description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list - of block devices to be used by the container. + This field is immutable. It can only be set for containers. items: - description: volumeDevice describes - a mapping of a raw block device within - a container. + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. properties: - devicePath: - description: devicePath is the path - inside of the container that the - device will be mapped to. - type: string name: - description: name must match the - name of a persistentVolumeClaim - in the pod + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string required: - - devicePath - name type: object type: array x-kubernetes-list-map-keys: - - devicePath + - name x-kubernetes-list-type: map - volumeMounts: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. - Cannot be updated. - items: - description: VolumeMount describes a - mounting of a Volume within a container. + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + Restart policy for the container to manage the restart behavior of each + container within a pod. + You cannot set this field on ephemeral containers. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. You cannot set this field on + ephemeral containers. + items: + description: ContainerRestartRule describes + how a container exit is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the exit codes + to check on container exits. properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: + operator: 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. type: string - name: - description: This must match the - Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If 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. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: + values: description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set required: - - mountPath - - name + - operator type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: - description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - hostAliases: - description: |- - HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts - file if specified. - items: + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. + Optional: SecurityContext defines the security options the ephemeral container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. properties: - hostnames: - description: Hostnames for the above IP - address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file - entry. + allowPrivilegeEscalation: + description: |- + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + 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. + properties: + 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". + type: string + type: + description: |- + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type + type: object + capabilities: + description: |- + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent + POSIX capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability represent + POSIX capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. type: string - required: - - ip - type: object - type: array - x-kubernetes-list-map-keys: - - ip - x-kubernetes-list-type: map - hostIPC: - description: |- - Use the host's ipc namespace. - Optional: Default to false. - type: boolean - hostNetwork: - description: |- - Host networking requested for this pod. Use the host's network namespace. - When using HostNetwork you should specify ports so the scheduler is aware. - When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, - and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. - Default to false. - type: boolean - hostPID: - description: |- - Use the host's pid namespace. - Optional: Default to false. - type: boolean - hostUsers: - description: |- - Use the host's user namespace. - Optional: Default to true. - If set to true or not present, the pod will be run in the host user namespace, useful - for when the pod needs a feature only available to the host user namespace, such as - loading a kernel module with CAP_SYS_MODULE. - When set to false, a new userns is created for the pod. Setting false is useful for - mitigating container breakout vulnerabilities even allowing users to run their - containers as root without actually having root privileges on the host. - type: boolean - hostname: - description: |- - Specifies the hostname of the Pod - If not specified, the pod's hostname will be set to a system-defined value. - type: string - hostnameOverride: - description: |- - HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. - This field only specifies the pod's hostname and does not affect its DNS records. - When this field is set to a non-empty string: - - It takes precedence over the values set in `hostname` and `subdomain`. - - The Pod's hostname will be set to this value. - - `setHostnameAsFQDN` must be nil or set to false. - - `hostNetwork` must be set to false. + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level + label that applies to the container. + type: string + role: + description: Role is a SELinux role + label that applies to the container. + type: string + type: + description: Type is a SELinux type + label that applies to the container. + type: string + user: + description: User is a SELinux user + label that applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: |- + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: - This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. - Requires the HostnameOverride feature gate to be enabled. - type: string - imagePullSecrets: - description: |- - ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. - If specified, these secrets will be passed to individual puller implementations for them to use. - More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: description: |- - 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 - type: string + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: |- + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA credential + spec to use. + type: string + hostProcess: + description: |- + HostProcess determines if a container should be run as a 'Host 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. + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - initContainers: - description: |- - List of initialization containers belonging to the pod. - Init containers are executed in order prior to containers being started. If any - init container fails, the pod is considered to have failed and is handled according - to its restartPolicy. The name for an init container or normal container must be - unique among all containers. - Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. - The resourceRequirements of an init container are taken into account during scheduling - by finding the highest request/limit for each resource type, and then using the max of - that value or the sum of the normal containers. Limits are applied to init containers - in a similar fashion. - Init containers cannot currently be added or removed. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container - that you want to run within a pod. + startupProbe: + description: Probes are not allowed for ephemeral + containers. properties: - args: - description: |- - 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - env: - description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment - variable present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - valueFrom: - description: Source for the environment - variable's value. Cannot be used - if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of - a ConfigMap. - properties: - key: - description: The key to - select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether - the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of - the schema the FieldPath - is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the - field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. - type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The name of - the volume mount containing - the env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container - name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the - output format of the exposed - resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of - a secret in the pod's namespace - properties: - key: - description: The key of - the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether - the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field + value + type: string + required: + - name + - value type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource represents - the source of a set of ConfigMaps - or Secrets + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + targetContainerName: + description: |- + If set, the name of the container from PodSpec that this ephemeral container targets. + The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + If not set then the ephemeral container uses the namespaces configured in the Pod spec. + + The container runtime must implement support for this feature. If the runtime does not + support namespace targeting then the result of setting this field is undefined. + type: string + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of + block devices to be used by the container. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path + inside of the container that the device + will be mapped to. + type: string + name: + description: name must match the name + of a persistentVolumeClaim in the + pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. + Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match the Name + of a Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. + + If ReadOnly is false, this field has no meaning and must be unspecified. + + If 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. + + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). + + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + hostAliases: + description: |- + HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + file if specified. + items: + description: |- + HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the + pod's hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + description: IP address of the host file entry. + type: string + required: + - ip + type: object + type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map + hostIPC: + description: |- + Use the host's ipc namespace. + Optional: Default to false. + type: boolean + hostNetwork: + description: |- + Host networking requested for this pod. Use the host's network namespace. + When using HostNetwork you should specify ports so the scheduler is aware. + When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, + and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. + Default to false. + type: boolean + hostPID: + description: |- + Use the host's pid namespace. + Optional: Default to false. + type: boolean + hostUsers: + description: |- + Use the host's user namespace. + Optional: Default to true. + If set to true or not present, the pod will be run in the host user namespace, useful + for when the pod needs a feature only available to the host user namespace, such as + loading a kernel module with CAP_SYS_MODULE. + When set to false, a new userns is created for the pod. Setting false is useful for + mitigating container breakout vulnerabilities even allowing users to run their + containers as root without actually having root privileges on the host. + type: boolean + hostname: + description: |- + Specifies the hostname of the Pod + If not specified, the pod's hostname will be set to a system-defined value. + type: string + hostnameOverride: + description: |- + HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. + This field only specifies the pod's hostname and does not affect its DNS records. + When this field is set to a non-empty string: + - It takes precedence over the values set in `hostname` and `subdomain`. + - The Pod's hostname will be set to this value. + - `setHostnameAsFQDN` must be nil or set to false. + - `hostNetwork` must be set to false. + + This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. + Requires the HostnameOverride feature gate to be enabled. + type: string + imagePullSecrets: + description: |- + ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + default: "" + description: |- + 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 + type: string + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + initContainers: + description: |- + List of initialization containers belonging to the pod. + Init containers are executed in order prior to containers being started. If any + init container fails, the pod is considered to have failed and is handled according + to its restartPolicy. The name for an init container or normal container must be + unique among all containers. + Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + The resourceRequirements of an init container are taken into account during scheduling + by finding the highest request/limit for each resource type, and then using the max of + that value or the sum of the normal containers. Limits are applied to init containers + in a similar fashion. + Init containers cannot currently be added or removed. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + items: + description: A single application container that + you want to run within a pod. + properties: + args: + description: |- + 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment + variable's value. Cannot be used if + value is not empty. properties: - configMapRef: - description: The ConfigMap to select - from + configMapKeyRef: + description: Selects a key of a + ConfigMap. properties: + key: + description: The key to select. + type: string name: default: "" description: |- @@ -4706,19 +4571,106 @@ spec: type: string optional: description: Specify whether - the ConfigMap must be defined + the ConfigMap or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select - from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the + schema the FieldPath is written + in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the + volume mount containing the + env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a + secret in the pod's namespace + properties: + key: + description: The key of the + secret to select from. Must + be a valid secret key. + type: string name: default: "" description: |- @@ -4730,279 +4682,104 @@ spec: type: string optional: description: Specify whether - the Secret must be defined + the Secret or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - 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 and StatefulSets. - type: string - imagePullPolicy: - description: |- - 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 - type: string - lifecycle: - description: |- - Actions that the management system should take in response to container lifecycle events. - Cannot be updated. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a - command to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers - to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom header - to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access - on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the container - should sleep. - properties: - seconds: - description: Seconds is the - number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host - name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a - command to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers - to set in the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom header - to be used in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access - on the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the container - should sleep. - properties: - seconds: - description: Seconds is the - number of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host - name to connect to, defaults - to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the + source of a set of ConfigMaps or Secrets + properties: + configMapRef: + description: The ConfigMap to select + from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the + ConfigMap must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the + Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + 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 and StatefulSets. + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: |- + Actions that the management system should take in response to container lifecycle events. + Cannot be updated. + properties: + postStart: description: |- - Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command @@ -5020,33 +4797,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -5101,27 +4851,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number + of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name @@ -5140,91 +4886,18 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - name: - description: |- - Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: |- - 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. - 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. - items: - description: ContainerPort represents - a network port in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind - the external port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: + preStop: description: |- - Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command @@ -5242,33 +4915,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -5323,27 +4969,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number + of seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name @@ -5362,696 +5004,1303 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - resizePolicy: + stopSignal: description: |- - Resources resize policy for the container. - This field cannot be set on ephemeral containers. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: |- + Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: description: |- - Compute Resources required by this container. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. properties: - claims: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 + type: integer + service: + default: "" description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. + description: HTTPHeader describes + a custom header to be used in + HTTP probes properties: name: 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. + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + value: + description: The header field + value type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: 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/ - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - restartPolicy: - description: |- - RestartPolicy defines the restart behavior of individual containers in a pod. - This overrides the pod-level restart policy. When this field is not specified, - the restart behavior is defined by the Pod's restart policy and the container type. - Additionally, 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. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. The rules are evaluated in - order. Once a rule matches a container exit condition, the remaining - rules are ignored. If no rule matches the container exit condition, - the Container-level restart policy determines the whether the container - is restarted or not. Constraints on the rules: - - At most 20 rules are allowed. - - Rules can have the same action. - - Identical rules are not forbidden in validations. - When rules are specified, container MUST set RestartPolicy explicitly - even it if matches the Pod's RestartPolicy. - items: - description: ContainerRestartRule describes - how a container exit is handled. - properties: - action: - description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. - type: string - exitCodes: - description: Represents the exit - codes to check on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object - required: - - action - type: object - type: array - x-kubernetes-list-type: atomic - securityContext: + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: description: |- - SecurityContext defines the security options the container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - allowPrivilegeEscalation: - description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - appArmorProfile: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: - description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: |- + 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. + 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. + items: + description: ContainerPort represents a + network port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the + external port to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: |- + Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: + service: + default: "" description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux - level label that applies to - the container. - type: string - role: - description: Role is a SELinux - role label that applies to the - container. - type: string - type: - description: Type is a SELinux - type label that applies to the - container. - type: string - user: - description: User is a SELinux - user label that applies to the - container. - type: string - type: object - seccompProfile: + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - startupProbe: - description: |- - StartupProbe indicates that the Pod has successfully initialized. - If specified, no other probes are executed until this completes successfully. - If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC - HealthCheckRequest. - properties: - port: - description: Port number of the - gRPC service. Number must be - in the range 1 to 65535. + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: |- + Resources resize policy for the container. + This field cannot be set on ephemeral containers. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Compute Resources required by this container. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + RestartPolicy defines the restart behavior of individual containers in a pod. + This overrides the pod-level restart policy. When this field is not specified, + the restart behavior is defined by the Pod's restart policy and the container type. + Additionally, 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. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. The rules are evaluated in + order. Once a rule matches a container exit condition, the remaining + rules are ignored. If no rule matches the container exit condition, + the Container-level restart policy determines the whether the container + is restarted or not. Constraints on the rules: + - At most 20 rules are allowed. + - Rules can have the same action. + - Identical rules are not forbidden in validations. + When rules are specified, container MUST set RestartPolicy explicitly + even it if matches the Pod's RestartPolicy. + items: + description: ContainerRestartRule describes + how a container exit is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the exit codes + to check on container exits. + properties: + operator: + description: |- + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. + type: string + values: + description: |- + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: format: int32 type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an - HTTP GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to - set in the request. HTTP allows - repeated headers. - items: - description: HTTPHeader describes - a custom header to be used - in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header - field value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on - the HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies a - connection to a TCP port. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + SecurityContext defines the security options the container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + properties: + allowPrivilegeEscalation: + description: |- + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + 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. + properties: + localhostProfile: description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: + 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". + type: string + type: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type type: object - stdin: + capabilities: description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent + POSIX capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability represent + POSIX capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. type: boolean - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. type: string - tty: + readOnlyRootFilesystem: description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Whether this container has a read-only root filesystem. Default is false. + Note that this field cannot be set when spec.os.name is windows. type: boolean - volumeDevices: - description: volumeDevices is the list - of block devices to be used by the container. - items: - description: volumeDevice describes - a mapping of a raw block device within - a container. - properties: - devicePath: - description: devicePath is the path - inside of the container that the - device will be mapped to. - type: string - name: - description: name must match the - name of a persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - devicePath - x-kubernetes-list-type: map - volumeMounts: + runAsGroup: description: |- - Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a - mounting of a Volume within a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the - Name of a Volume. + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level + label that applies to the container. + type: string + role: + description: Role is a SELinux role + label that applies to the container. + type: string + type: + description: Type is a SELinux type + label that applies to the container. + type: string + user: + description: User is a SELinux user + label that applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: |- + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: |- + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA credential + spec to use. + type: string + hostProcess: + description: |- + HostProcess determines if a container should be run as a 'Host 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. + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + startupProbe: + description: |- + StartupProbe indicates that the Pod has successfully initialized. + If specified, no other probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + when it might take a long time to load data or warm a cache, than during steady-state operation. + This cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command + to execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC + service. Number must be in the range + 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP + GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set + in the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in + HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the + HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name + to connect to, defaults to the pod + IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of + block devices to be used by the container. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path + inside of the container that the device + will be mapped to. + type: string + name: + description: name must match the name + of a persistentVolumeClaim in the + pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match the Name + of a Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. - If ReadOnly is false, this field has no meaning and must be unspecified. + If ReadOnly is false, this field has no meaning and must be unspecified. - If 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. + If 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. - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + nodeName: + description: |- + NodeName indicates in which node this pod is scheduled. + If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. + Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. + This field should not be used to express a desire for the pod to be scheduled on a specific node. + https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + type: string + nodeSelector: + additionalProperties: + type: string + description: |- + NodeSelector is a selector which must be true for the pod to fit on a node. + Selector which must match a node's labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + type: object + x-kubernetes-map-type: atomic + os: + description: |- + Specifies the OS of the containers in the pod. + Some pod and container fields are restricted if this is set. + + If the OS field is set to linux, the following fields must be unset: + -securityContext.windowsOptions + + If the OS field is set to windows, following fields must be unset: + - spec.hostPID + - spec.hostIPC + - spec.hostUsers + - spec.resources + - spec.securityContext.appArmorProfile + - spec.securityContext.seLinuxOptions + - spec.securityContext.seccompProfile + - spec.securityContext.fsGroup + - spec.securityContext.fsGroupChangePolicy + - spec.securityContext.sysctls + - spec.shareProcessNamespace + - spec.securityContext.runAsUser + - spec.securityContext.runAsGroup + - spec.securityContext.supplementalGroups + - spec.securityContext.supplementalGroupsPolicy + - spec.containers[*].securityContext.appArmorProfile + - spec.containers[*].securityContext.seLinuxOptions + - spec.containers[*].securityContext.seccompProfile + - spec.containers[*].securityContext.capabilities + - spec.containers[*].securityContext.readOnlyRootFilesystem + - spec.containers[*].securityContext.privileged + - spec.containers[*].securityContext.allowPrivilegeEscalation + - spec.containers[*].securityContext.procMount + - spec.containers[*].securityContext.runAsUser + - spec.containers[*].securityContext.runAsGroup + properties: + name: + description: |- + Name is the name of the operating system. The currently supported values are linux and windows. + Additional value may be defined in future and can be one of: + https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + Clients should expect to handle additional values and treat unrecognized values in this field as os: null + type: string + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + This field will be autopopulated at admission time by the RuntimeClass admission controller. If + the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + The RuntimeClass admission controller will reject Pod create requests which have the overhead already + set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + type: object + preemptionPolicy: + description: |- + PreemptionPolicy is the Policy for preempting pods with lower priority. + One of Never, PreemptLowerPriority. + Defaults to PreemptLowerPriority if unset. + type: string + priority: + description: |- + The priority value. Various system components use this field to find the + priority of the pod. When Priority Admission Controller is enabled, it + prevents users from setting this field. The admission controller populates + this field from PriorityClassName. + The higher the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: |- + If specified, indicates the pod's priority. "system-node-critical" and + "system-cluster-critical" are two special keywords which indicate the + highest priorities with the former being the highest priority. Any other + name must be defined by creating a PriorityClass object with that name. + If not specified, the pod priority will be default or zero if there is no + default. + type: string + readinessGates: + description: |- + If specified, all readiness gates will be evaluated for pod readiness. + A pod is ready when all its containers are ready AND + all conditions specified in the readiness gates have status equal to "True" + More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + items: + description: PodReadinessGate contains the reference + to a pod condition + properties: + conditionType: + description: ConditionType refers to a condition + in the pod's condition list with matching + type. + type: string + required: + - conditionType + type: object + type: array + x-kubernetes-list-type: atomic + resourceClaims: + description: |- + ResourceClaims defines which ResourceClaims must be allocated + and reserved before the Pod is allowed to start. The resources + will be made available to those containers which consume them + by name. + + This is a stable field but requires that the + DynamicResourceAllocation feature gate is enabled. + + This field is immutable. + items: + description: |- + PodResourceClaim references exactly one ResourceClaim, either directly + or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim + for the pod. + + It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. + Containers that need access to the ResourceClaim reference it with this name. + + When the DRAWorkloadResourceClaims feature gate is enabled and this Pod + belongs to a PodGroup, a PodResourceClaim is matched to a + PodGroupResourceClaim if all of their fields are equal (Name, + ResourceClaimName, and ResourceClaimTemplateName). A matched claim references + a single ResourceClaim shared across all Pods in the PodGroup, reserved for + the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual + Pods. + properties: + name: + description: |- + Name uniquely identifies this resource claim inside the pod. + This must be a DNS_LABEL. + type: string + resourceClaimName: + description: |- + ResourceClaimName is the name of a ResourceClaim object in the same + namespace as this pod. + + Exactly one of ResourceClaimName and ResourceClaimTemplateName must + be set. + type: string + resourceClaimTemplateName: + description: |- + ResourceClaimTemplateName is the name of a ResourceClaimTemplate + object in the same namespace as this pod. + + The template will be used to create a new ResourceClaim, which will + be bound to this pod. When this pod is deleted, the ResourceClaim + will also be deleted. The pod name and resource name, along with a + generated component, will be used to form a unique name for the + ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + + When the DRAWorkloadResourceClaims feature gate is enabled and the pod + belongs to a PodGroup that defines a PodGroupResourceClaim with the same + Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the + ResourceClaim generated for the PodGroup. All pods in the group that + define an equivalent PodResourceClaim matching the + PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same + generated ResourceClaim. ResourceClaims generated for a PodGroup are + owned by the PodGroup and their lifecycles are tied to the PodGroup + instead of any individual pod. + + This field is immutable and no changes will be made to the + corresponding ResourceClaim by the control plane after creating the + ResourceClaim. + + Exactly one of ResourceClaimName and ResourceClaimTemplateName must + be set. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + resources: + description: |- + Resources is the total amount of CPU and Memory resources required by all + containers in the pod. It supports specifying Requests and Limits for + "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. + + This field enables fine-grained control over resource allocation for the + entire pod, allowing resource sharing among containers in a pod. + + This is an alpha field and requires enabling the PodLevelResources feature + gate. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + 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. + type: string + request: description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string required: - name @@ -6060,69 +6309,18 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map - nodeName: - description: |- - NodeName indicates in which node this pod is scheduled. - If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. - Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. - This field should not be used to express a desire for the pod to be scheduled on a specific node. - https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename - type: string - nodeSelector: + limits: additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - type: object - x-kubernetes-map-type: atomic - os: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - Specifies the OS of the containers in the pod. - Some pod and container fields are restricted if this is set. - - If the OS field is set to linux, the following fields must be unset: - -securityContext.windowsOptions - - If the OS field is set to windows, following fields must be unset: - - spec.hostPID - - spec.hostIPC - - spec.hostUsers - - spec.resources - - spec.securityContext.appArmorProfile - - spec.securityContext.seLinuxOptions - - spec.securityContext.seccompProfile - - spec.securityContext.fsGroup - - spec.securityContext.fsGroupChangePolicy - - spec.securityContext.sysctls - - spec.shareProcessNamespace - - spec.securityContext.runAsUser - - spec.securityContext.runAsGroup - - spec.securityContext.supplementalGroups - - spec.securityContext.supplementalGroupsPolicy - - spec.containers[*].securityContext.appArmorProfile - - spec.containers[*].securityContext.seLinuxOptions - - spec.containers[*].securityContext.seccompProfile - - spec.containers[*].securityContext.capabilities - - spec.containers[*].securityContext.readOnlyRootFilesystem - - spec.containers[*].securityContext.privileged - - spec.containers[*].securityContext.allowPrivilegeEscalation - - spec.containers[*].securityContext.procMount - - spec.containers[*].securityContext.runAsUser - - spec.containers[*].securityContext.runAsGroup - properties: - name: - description: |- - Name is the name of the operating system. The currently supported values are linux and windows. - Additional value may be defined in future and can be one of: - https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration - Clients should expect to handle additional values and treat unrecognized values in this field as os: null - type: string - required: - - name + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - overhead: + requests: additionalProperties: anyOf: - type: integer @@ -6130,1040 +6328,770 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- - Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. - This field will be autopopulated at admission time by the RuntimeClass admission controller. If - the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. - The RuntimeClass admission controller will reject Pod create requests which have the overhead already - set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value - defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. - More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + 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/ type: object - preemptionPolicy: + type: object + restartPolicy: + description: |- + Restart policy for all containers within the pod. + One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. + Default to Always. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + type: string + runtimeClassName: + description: |- + RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + empty definition that uses the default runtime handler. + More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + type: string + schedulerName: + description: |- + If specified, the pod will be dispatched by specified scheduler. + If not specified, the pod will be dispatched by default scheduler. + type: string + schedulingGates: + description: |- + SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the + scheduler will not attempt to schedule the pod. + + SchedulingGates can only be set at pod creation time, and be removed only afterwards. + items: + description: PodSchedulingGate is associated to + a Pod to guard its scheduling. + properties: + name: + description: |- + Name of the scheduling gate. + Each scheduling gate must have a unique name field. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + schedulingGroup: + description: |- + SchedulingGroup provides a reference to the immediate scheduling runtime + grouping object that this Pod belongs to. + This field is used by the scheduler to identify the group and apply the + correct group scheduling policies. The association with a group also + impacts other lifecycle aspects of a Pod that are relevant in a wider context + of scheduling like preemption, resource attachment, etc. If not specified, + the Pod is treated as a single unit in all of these aspects. + The group object referenced by this field may not exist at the time the + Pod is created. + This field is immutable, but a group object with the same name may be + recreated with different policies. Doing this during pod scheduling + may result in the placement not conforming to the expected policies. + properties: + podGroupName: description: |- - PreemptionPolicy is the Policy for preempting pods with lower priority. - One of Never, PreemptLowerPriority. - Defaults to PreemptLowerPriority if unset. + PodGroupName specifies the name of the standalone PodGroup object + that represents the runtime instance of this group. + Must be a DNS subdomain. type: string - priority: + type: object + securityContext: + description: |- + SecurityContext holds pod-level security attributes and common container settings. + Optional: Defaults to empty. See type description for default values of each field. + properties: + 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. + properties: + 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". + type: string + type: + description: |- + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type + type: object + fsGroup: description: |- - The priority value. Various system components use this field to find the - priority of the pod. When Priority Admission Controller is enabled, it - prevents users from setting this field. The admission controller populates - this field from PriorityClassName. - The higher the value, the higher the priority. - format: int32 + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: + + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + format: int64 type: integer - priorityClassName: + fsGroupChangePolicy: description: |- - If specified, indicates the pod's priority. "system-node-critical" and - "system-cluster-critical" are two special keywords which indicate the - highest priorities with the former being the highest priority. Any other - name must be defined by creating a PriorityClass object with that name. - If not specified, the pod priority will be default or zero if there is no - default. + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. type: string - readinessGates: + runAsGroup: description: |- - If specified, all readiness gates will be evaluated for pod readiness. - A pod is ready when all its containers are ready AND - all conditions specified in the readiness gates have status equal to "True" - More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates - items: - description: PodReadinessGate contains the - reference to a pod condition - properties: - conditionType: - description: ConditionType refers to a - condition in the pod's condition list - with matching type. - type: string - required: - - conditionType - type: object - type: array - x-kubernetes-list-type: atomic - resourceClaims: + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: description: |- - ResourceClaims defines which ResourceClaims must be allocated - and reserved before the Pod is allowed to start. The resources - will be made available to those containers which consume them - by name. - - This is a stable field but requires that the - DynamicResourceAllocation feature gate is enabled. - - This field is immutable. - items: - description: |- - PodResourceClaim references exactly one ResourceClaim, either directly - or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim - for the pod. - - It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. - Containers that need access to the ResourceClaim reference it with this name. - - When the DRAWorkloadResourceClaims feature gate is enabled and this Pod - belongs to a PodGroup, a PodResourceClaim is matched to a - PodGroupResourceClaim if all of their fields are equal (Name, - ResourceClaimName, and ResourceClaimTemplateName). A matched claim references - a single ResourceClaim shared across all Pods in the PodGroup, reserved for - the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual - Pods. - properties: - name: - description: |- - Name uniquely identifies this resource claim inside the pod. - This must be a DNS_LABEL. - type: string - resourceClaimName: - description: |- - ResourceClaimName is the name of a ResourceClaim object in the same - namespace as this pod. + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxChangePolicy: + description: |- + seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + Valid values are "MountOption" and "Recursive". - Exactly one of ResourceClaimName and ResourceClaimTemplateName must - be set. - type: string - resourceClaimTemplateName: - description: |- - ResourceClaimTemplateName is the name of a ResourceClaimTemplate - object in the same namespace as this pod. + "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. - The template will be used to create a new ResourceClaim, which will - be bound to this pod. When this pod is deleted, the ResourceClaim - will also be deleted. The pod name and resource name, along with a - generated component, will be used to form a unique name for the - ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + This requires all Pods that share the same volume to use the same SELinux label. + It is not possible to share the same volume among privileged and unprivileged Pods. + Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + CSIDriver instance. Other volumes are always re-labelled recursively. + "MountOption" value is allowed only when SELinuxMount feature gate is enabled. - When the DRAWorkloadResourceClaims feature gate is enabled and the pod - belongs to a PodGroup that defines a PodGroupResourceClaim with the same - Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the - ResourceClaim generated for the PodGroup. All pods in the group that - define an equivalent PodResourceClaim matching the - PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same - generated ResourceClaim. ResourceClaims generated for a PodGroup are - owned by the PodGroup and their lifecycles are tied to the PodGroup - instead of any individual pod. + If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + and "Recursive" for all other volumes. - This field is immutable and no changes will be made to the - corresponding ResourceClaim by the control plane after creating the - ResourceClaim. + This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. - Exactly one of ResourceClaimName and ResourceClaimTemplateName must - be set. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - resources: + All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + Note that this field cannot be set when spec.os.name is windows. + type: string + seLinuxOptions: description: |- - Resources is the total amount of CPU and Memory resources required by all - containers in the pod. It supports specifying Requests and Limits for - "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. - - This field enables fine-grained control over resource allocation for the - entire pod, allowing resource sharing among containers in a pod. - - This is an alpha field and requires enabling the PodLevelResources feature - gate. + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - 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. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: 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/ - type: object + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type type: object - restartPolicy: + supplementalGroups: description: |- - Restart policy for all containers within the pod. - One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. - Default to Always. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy - type: string - runtimeClassName: - description: |- - RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used - to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. - If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an - empty definition that uses the default runtime handler. - More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class - type: string - schedulerName: + A list of groups applied to the first process run in each container, in + addition to the container's primary GID and fsGroup (if specified). If + the SupplementalGroupsPolicy feature is enabled, the + supplementalGroupsPolicy field determines whether these are in addition + to or instead of any group memberships defined in the container image. + If unspecified, no additional groups are added, though group memberships + defined in the container image may still be used, depending on the + supplementalGroupsPolicy field. + Note that this field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: description: |- - If specified, the pod will be dispatched by specified scheduler. - If not specified, the pod will be dispatched by default scheduler. + Defines how supplemental groups of the first container processes are calculated. + Valid values are "Merge" and "Strict". If not specified, "Merge" is used. + (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled + and the container runtime must implement support for this feature. + Note that this field cannot be set when spec.os.name is windows. type: string - schedulingGates: + sysctls: description: |- - SchedulingGates is an opaque list of values that if specified will block scheduling the pod. - If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the - scheduler will not attempt to schedule the pod. - - SchedulingGates can only be set at pod creation time, and be removed only afterwards. + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. items: - description: PodSchedulingGate is associated - to a Pod to guard its scheduling. + description: Sysctl defines a kernel parameter + to be set properties: name: - description: |- - Name of the scheduling gate. - Each scheduling gate must have a unique name field. + description: Name of a property to set + type: string + value: + description: Value of a property to set type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - schedulingGroup: + x-kubernetes-list-type: atomic + windowsOptions: description: |- - SchedulingGroup provides a reference to the immediate scheduling runtime - grouping object that this Pod belongs to. - This field is used by the scheduler to identify the group and apply the - correct group scheduling policies. The association with a group also - impacts other lifecycle aspects of a Pod that are relevant in a wider context - of scheduling like preemption, resource attachment, etc. If not specified, - the Pod is treated as a single unit in all of these aspects. - The group object referenced by this field may not exist at the time the - Pod is created. - This field is immutable, but a group object with the same name may be - recreated with different policies. Doing this during pod scheduling - may result in the placement not conforming to the expected policies. + The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. properties: - podGroupName: + gmsaCredentialSpec: description: |- - PodGroupName specifies the name of the standalone PodGroup object - that represents the runtime instance of this group. - Must be a DNS subdomain. + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. type: string - type: object - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - Optional: Defaults to empty. See type description for default values of each field. - properties: - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - fsGroup: - description: |- - A special supplemental group that applies to all containers in a pod. - Some volume types allow the Kubelet to change the ownership of that volume - to be owned by the pod: - - 1. The owning GID will be the FSGroup - 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) - 3. The permission bits are OR'd with rw-rw---- - - If unset, the Kubelet will not modify the ownership and permissions of any volume. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - fsGroupChangePolicy: - description: |- - fsGroupChangePolicy defines behavior of changing ownership and permission of the volume - before being exposed inside Pod. This field will only apply to - volume types which support fsGroup based ownership(and permissions). - It will have no effect on ephemeral volume types such as: secret, configmaps - and emptydir. - Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. - Note that this field cannot be set when spec.os.name is windows. + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. type: string - runAsGroup: - description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence - for that container. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: + hostProcess: description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. + HostProcess determines if a container should be run as a 'Host 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. type: boolean - runAsUser: - description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence - for that container. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxChangePolicy: + runAsUserName: description: |- - seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. - It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. - Valid values are "MountOption" and "Recursive". - - "Recursive" means relabeling of all files on all Pod volumes by the container runtime. - This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. - - "MountOption" mounts all eligible Pod volumes with `-o context` mount option. - This requires all Pods that share the same volume to use the same SELinux label. - It is not possible to share the same volume among privileged and unprivileged Pods. - Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes - whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their - CSIDriver instance. Other volumes are always re-labelled recursively. - "MountOption" value is allowed only when SELinuxMount feature gate is enabled. - - If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. - If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes - and "Recursive" for all other volumes. - - This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. - - All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. - Note that this field cannot be set when spec.os.name is windows. + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. type: string - seLinuxOptions: - description: |- - The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in SecurityContext. If set in - both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level - label that applies to the container. - type: string - role: - description: Role is a SELinux role - label that applies to the container. - type: string - type: - description: Type is a SELinux type - label that applies to the container. - type: string - user: - description: User is a SELinux user - label that applies to the container. - type: string - type: object - seccompProfile: - description: |- - The seccomp options to use by the containers in this pod. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: + type: object + type: object + serviceAccount: + description: |- + DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. + Deprecated: Use serviceAccountName instead. + type: string + serviceAccountName: + description: |- + ServiceAccountName is the name of the ServiceAccount to use to run this pod. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + type: string + setHostnameAsFQDN: + description: |- + If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + If a pod does not have FQDN, this has no effect. + Default to false. + type: boolean + shareProcessNamespace: + description: |- + Share a single process namespace between all of the containers in a pod. + When this is set containers will be able to view and signal processes from other containers + in the same pod, and the first process in each container will not be assigned PID 1. + HostPID and ShareProcessNamespace cannot both be set. + Optional: Default to false. + type: boolean + subdomain: + description: |- + If specified, the fully qualified Pod hostname will be "...svc.". + If not specified, the pod will not have a domainname at all. + type: string + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + If this value is nil, the default grace period will be used instead. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + Defaults to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + topologySpreadConstraints: + description: |- + TopologySpreadConstraints describes how a group of pods ought to spread across topology + domains. Scheduler will schedule pods in a way which abides by the constraints. + All topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint specifies + how to spread matching pods among the given + topology. + properties: + labelSelector: + description: |- + LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine the number of pods + in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key + that the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - required: - - type - type: object - supplementalGroups: - description: |- - A list of groups applied to the first process run in each container, in - addition to the container's primary GID and fsGroup (if specified). If - the SupplementalGroupsPolicy feature is enabled, the - supplementalGroupsPolicy field determines whether these are in addition - to or instead of any group memberships defined in the container image. - If unspecified, no additional groups are added, though group memberships - defined in the container image may still be used, depending on the - supplementalGroupsPolicy field. - Note that this field cannot be set when spec.os.name is windows. - items: - format: int64 - type: integer - type: array - x-kubernetes-list-type: atomic - supplementalGroupsPolicy: - description: |- - Defines how supplemental groups of the first container processes are calculated. - Valid values are "Merge" and "Strict". If not specified, "Merge" is used. - (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled - and the container runtime must implement support for this feature. - Note that this field cannot be set when spec.os.name is windows. - type: string - sysctls: - description: |- - Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported - sysctls (by the container runtime) might fail to launch. - Note that this field cannot be set when spec.os.name is windows. - items: - description: Sysctl defines a kernel parameter - to be set - properties: - name: - description: Name of a property to - set - type: string - value: - description: Value of a property to - set - type: string - required: - - name - - value + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: array - x-kubernetes-list-type: atomic - windowsOptions: - description: |- - The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - serviceAccount: - description: |- - DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. - Deprecated: Use serviceAccountName instead. - type: string - serviceAccountName: - description: |- - ServiceAccountName is the name of the ServiceAccount to use to run this pod. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - type: string - setHostnameAsFQDN: - description: |- - If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). - In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). - In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. - If a pod does not have FQDN, this has no effect. - Default to false. - type: boolean - shareProcessNamespace: - description: |- - Share a single process namespace between all of the containers in a pod. - When this is set containers will be able to view and signal processes from other containers - in the same pod, and the first process in each container will not be assigned PID 1. - HostPID and ShareProcessNamespace cannot both be set. - Optional: Default to false. - type: boolean - subdomain: - description: |- - If specified, the fully qualified Pod hostname will be "...svc.". - If not specified, the pod will not have a domainname at all. - type: string - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - If this value is nil, the default grace period will be used instead. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - Defaults to 30 seconds. - format: int64 - type: integer - tolerations: - description: If specified, the pod's tolerations. - items: + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select the pods over which + spreading will be calculated. The keys are used to lookup values from the + incoming pod labels, those key-value labels are ANDed with labelSelector + to select the group of existing pods over which spreading will be calculated + for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector isn't set. + Keys that don't exist in the incoming pod labels will + be ignored. A null or empty list means only match against labelSelector. + + This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: |- + MaxSkew describes the degree to which pods may be unevenly distributed. + When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + between the number of matching pods in the target topology and the global minimum. + The global minimum is the minimum number of matching pods in an eligible domain + or zero if the number of eligible domains is less than MinDomains. + For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + labelSelector spread as 2/2/1: + In this case, the global minimum is 1. + | zone1 | zone2 | zone3 | + | P P | P P | P | + - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; + scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + violate MaxSkew(1). + - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + to topologies that satisfy it. + It's a required field. Default value is 1 and 0 is not allowed. + format: int32 + type: integer + minDomains: + description: |- + MinDomains indicates a minimum number of eligible domains. + When the number of eligible domains with matching topology keys is less than minDomains, + Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. + And when the number of eligible domains with matching topology keys equals or greater than minDomains, + this value has no effect on scheduling. + As a result, when the number of eligible domains is less than minDomains, + scheduler won't schedule more than maxSkew Pods to those domains. + If value is nil, the constraint behaves as if MinDomains is equal to 1. + Valid values are integers greater than 0. + When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + + For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same + labelSelector spread as 2/2/2: + | zone1 | zone2 | zone3 | + | P P | P P | P P | + The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. + In this situation, new pod with the same labelSelector cannot be scheduled, + because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, + it will violate MaxSkew. + format: int32 + type: integer + nodeAffinityPolicy: + description: |- + NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector + when calculating pod topology spread skew. Options are: + - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. + - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + + If this value is nil, the behavior is equivalent to the Honor policy. + type: string + nodeTaintsPolicy: + description: |- + NodeTaintsPolicy indicates how we will treat node taints when calculating + pod topology spread skew. Options are: + - Honor: nodes without taints, along with tainted nodes for which the incoming pod + has a toleration, are included. + - Ignore: node taints are ignored. All nodes are included. + + If this value is nil, the behavior is equivalent to the Ignore policy. + type: string + topologyKey: + description: |- + TopologyKey is the key of node labels. Nodes that have a label with this key + and identical values are considered to be in the same topology. + We consider each as a "bucket", and try to put balanced number + of pods into each bucket. + We define a domain as a particular instance of a topology. + Also, we define an eligible domain as a domain whose nodes meet the requirements of + nodeAffinityPolicy and nodeTaintsPolicy. + e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. + And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. + It's a required field. + type: string + whenUnsatisfiable: + description: |- + WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + the spread constraint. + - DoNotSchedule (default) tells the scheduler not to schedule it. + - ScheduleAnyway tells the scheduler to schedule the pod in any location, + but giving higher precedence to topologies that would help reduce the + skew. + A constraint is considered "Unsatisfiable" for an incoming pod + if and only if every possible node assignment for that pod would violate + "MaxSkew" on some topology. + For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + labelSelector spread as 3/1/1: + | zone1 | zone2 | zone3 | + | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + won't make it *more* imbalanced. + It's a required field. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + description: |- + List of volumes that can be mounted by containers belonging to the pod. + More info: https://kubernetes.io/docs/concepts/storage/volumes + items: + description: Volume represents a named volume + in a pod that may be accessed by any container + in the pod. + properties: + awsElasticBlockStore: description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . + awsElasticBlockStore represents an AWS Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore properties: - effect: + fsType: description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + 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 type: string - key: + partition: + description: |- + 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). + format: int32 + type: integer + readOnly: description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. + readOnly value true will force the readOnly setting in VolumeMounts. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + type: boolean + volumeID: + description: |- + volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore type: string - operator: + required: + - volumeID + type: object + azureDisk: + description: |- + azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + are redirected to the disk.csi.azure.com CSI driver. + properties: + cachingMode: + description: 'cachingMode is the Host + Caching mode: None, Read Only, Read + Write.' + type: string + diskName: + description: diskName is the Name of the + data disk in the blob storage + type: string + diskURI: + description: diskURI is the URI of data + disk in the blob storage + type: string + fsType: + default: ext4 description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + 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. + type: string + kind: + description: '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' type: string - tolerationSeconds: + readOnly: + default: false description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: + readOnly Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: |- + azureFile represents an Azure File Service mount on the host and bind mount to the pod. + Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + are redirected to the file.csi.azure.com CSI driver. + properties: + readOnly: description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of + secret that contains Azure Storage Account + Name and Key + type: string + shareName: + description: shareName is the azure share + Name type: string + required: + - secretName + - shareName type: object - type: array - x-kubernetes-list-type: atomic - topologySpreadConstraints: - description: |- - TopologySpreadConstraints describes how a group of pods ought to spread across topology - domains. Scheduler will schedule pods in a way which abides by the constraints. - All topologySpreadConstraints are ANDed. - items: - description: TopologySpreadConstraint specifies - how to spread matching pods among the given - topology. + cephfs: + description: |- + cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. properties: - labelSelector: + monitors: description: |- - LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine the number of pods - in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a - list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select the pods over which - spreading will be calculated. The keys are used to lookup values from the - incoming pod labels, those key-value labels are ANDed with labelSelector - to select the group of existing pods over which spreading will be calculated - for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - MatchLabelKeys cannot be set when LabelSelector isn't set. - Keys that don't exist in the incoming pod labels will - be ignored. A null or empty list means only match against labelSelector. - - This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + monitors is Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it items: type: string type: array x-kubernetes-list-type: atomic - maxSkew: - description: |- - MaxSkew describes the degree to which pods may be unevenly distributed. - When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference - between the number of matching pods in the target topology and the global minimum. - The global minimum is the minimum number of matching pods in an eligible domain - or zero if the number of eligible domains is less than MinDomains. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 2/2/1: - In this case, the global minimum is 1. - | zone1 | zone2 | zone3 | - | P P | P P | P | - - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) - violate MaxSkew(1). - - if MaxSkew is 2, incoming pod can be scheduled onto any zone. - When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence - to topologies that satisfy it. - It's a required field. Default value is 1 and 0 is not allowed. - format: int32 - type: integer - minDomains: - description: |- - MinDomains indicates a minimum number of eligible domains. - When the number of eligible domains with matching topology keys is less than minDomains, - Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - And when the number of eligible domains with matching topology keys equals or greater than minDomains, - this value has no effect on scheduling. - As a result, when the number of eligible domains is less than minDomains, - scheduler won't schedule more than maxSkew Pods to those domains. - If value is nil, the constraint behaves as if MinDomains is equal to 1. - Valid values are integers greater than 0. - When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - - For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - labelSelector spread as 2/2/2: - | zone1 | zone2 | zone3 | - | P P | P P | P P | - The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - In this situation, new pod with the same labelSelector cannot be scheduled, - because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - it will violate MaxSkew. - format: int32 - type: integer - nodeAffinityPolicy: - description: |- - NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector - when calculating pod topology spread skew. Options are: - - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. - - If this value is nil, the behavior is equivalent to the Honor policy. + path: + description: 'path is Optional: Used as + the mounted root, rather than the full + Ceph tree, default is /' type: string - nodeTaintsPolicy: + readOnly: description: |- - NodeTaintsPolicy indicates how we will treat node taints when calculating - pod topology spread skew. Options are: - - Honor: nodes without taints, along with tainted nodes for which the incoming pod - has a toleration, are included. - - Ignore: node taints are ignored. All nodes are included. - - If this value is nil, the behavior is equivalent to the Ignore policy. - type: string - topologyKey: - description: |- - TopologyKey is the key of node labels. Nodes that have a label with this key - and identical values are considered to be in the same topology. - We consider each as a "bucket", and try to put balanced number - of pods into each bucket. - We define a domain as a particular instance of a topology. - Also, we define an eligible domain as a domain whose nodes meet the requirements of - nodeAffinityPolicy and nodeTaintsPolicy. - e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. - It's a required field. - type: string - whenUnsatisfiable: - description: |- - WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy - the spread constraint. - - DoNotSchedule (default) tells the scheduler not to schedule it. - - ScheduleAnyway tells the scheduler to schedule the pod in any location, - but giving higher precedence to topologies that would help reduce the - skew. - A constraint is considered "Unsatisfiable" for an incoming pod - if and only if every possible node assignment for that pod would violate - "MaxSkew" on some topology. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 3/1/1: - | zone1 | zone2 | zone3 | - | P P P | P | P | - If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled - to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies - MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler - won't make it *more* imbalanced. - It's a required field. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - - whenUnsatisfiable - x-kubernetes-list-type: map - volumes: - description: |- - List of volumes that can be mounted by containers belonging to the pod. - More info: https://kubernetes.io/docs/concepts/storage/volumes - items: - description: Volume represents a named volume - in a pod that may be accessed by any container - in the pod. - properties: - awsElasticBlockStore: + 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 + type: boolean + secretFile: description: |- - awsElasticBlockStore represents an AWS Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree - awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - properties: - fsType: - description: |- - 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 - type: string - partition: - description: |- - 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). - format: int32 - type: integer - readOnly: - description: |- - readOnly value true will force the readOnly setting in VolumeMounts. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: boolean - volumeID: - description: |- - volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: string - required: - - volumeID - type: object - azureDisk: + 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 + type: string + secretRef: description: |- - azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type - are redirected to the disk.csi.azure.com CSI driver. + 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 properties: - cachingMode: - description: 'cachingMode is the Host - Caching mode: None, Read Only, Read - Write.' - type: string - diskName: - description: diskName is the Name - of the data disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of - data disk in the blob storage - type: string - fsType: - default: ext4 + name: + default: "" description: |- - 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. - type: string - kind: - description: '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' + 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 type: string - readOnly: - default: false - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI type: object - azureFile: + x-kubernetes-map-type: atomic + user: description: |- - azureFile represents an Azure File Service mount on the host and bind mount to the pod. - Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type - are redirected to the file.csi.azure.com CSI driver. - properties: - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name - of secret that contains Azure Storage - Account Name and Key - type: string - shareName: - description: shareName is the azure - share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: + 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 + type: string + required: + - monitors + type: object + cinder: + description: |- + cinder represents a cinder volume attached and mounted on kubelets host machine. + Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + are redirected to the cinder.csi.openstack.org CSI driver. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + properties: + fsType: description: |- - cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. - Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. - properties: - monitors: - description: |- - monitors is Required: Monitors is a collection of Ceph monitors - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - path: - description: 'path is Optional: Used - as the mounted root, rather than - the full Ceph tree, default is /' - type: string - readOnly: - description: |- - 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 - type: boolean - secretFile: - description: |- - 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 - type: string - secretRef: - description: |- - 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 - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: |- - 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 - type: string - required: - - monitors - type: object - cinder: + 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 + type: string + readOnly: description: |- - cinder represents a cinder volume attached and mounted on kubelets host machine. - Deprecated: Cinder is deprecated. All operations for the in-tree cinder type - are redirected to the cinder.csi.openstack.org CSI driver. + 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 + type: boolean + secretRef: + description: |- + secretRef is optional: points to a secret object containing parameters used to connect + to OpenStack. properties: - fsType: - description: |- - 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 - type: string - readOnly: - description: |- - 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 - type: boolean - secretRef: - description: |- - secretRef is optional: points to a secret object containing parameters used to connect - to OpenStack. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: |- - volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap - that should populate this volume - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - items: - description: |- - 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 keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to - a path within a volume. - properties: - key: - description: key is the key - to project. - type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic name: default: "" description: |- @@ -7173,1793 +7101,1809 @@ spec: almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: optional specify whether - the ConfigMap or its keys must be - defined - type: boolean type: object x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) - represents ephemeral storage that is - handled by certain external CSI drivers. - properties: - driver: - description: |- - 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. - type: string - fsType: - description: |- - 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. - type: string - nodePublishSecretRef: - description: |- - 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 object contains more than one secret, all secret references are passed. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: |- - readOnly specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: + volumeID: + description: |- + volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap + that should populate this volume + properties: + defaultMode: + description: |- + 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. + format: int32 + type: integer + items: + description: |- + 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 keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a + path within a volume. + properties: + key: + description: key is the key to project. type: string - description: |- - volumeAttributes stores driver-specific properties that are passed to the CSI - driver. Consult your driver's documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward - API about the pod that should populate - this volume + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional specify whether + the ConfigMap or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) + represents ephemeral storage that is handled + by certain external CSI drivers. + properties: + driver: + description: |- + 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. + type: string + fsType: + description: |- + 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. + type: string + nodePublishSecretRef: + description: |- + 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 object contains more than one secret, all secret references are passed. properties: - defaultMode: + name: + default: "" description: |- - Optional: mode bits to use on created files by default. Must be a - 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. - format: int32 - type: integer - items: - description: Items is a list of downward - API volume file - items: - description: DownwardAPIVolumeFile - represents information to create - the file containing the pod field + 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 + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: |- + readOnly specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: |- + volumeAttributes stores driver-specific properties that are passed to the CSI + driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward + API about the pod that should populate this + volume + properties: + defaultMode: + description: |- + Optional: mode bits to use on created files by default. Must be a + 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. + format: int32 + type: integer + items: + description: Items is a list of downward + API volume file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects + a field of the pod: only annotations, + labels, name, namespace and uid + are supported.' properties: - fieldRef: - description: 'Required: Selects - a field of the pod: only annotations, - labels, name, namespace and - uid are supported.' - properties: - apiVersion: - description: Version of - the schema the FieldPath - is written in terms of, - defaults to "v1". - type: string - fieldPath: - description: Path of the - field to select in the - specified API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - 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 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 be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: Path - is the relative path name - of the file to be created. - Must not be absolute or contain - the ''..'' path. Must be utf-8 - encoded. The first item of - the relative path must not - start with ''..''' + apiVersion: + description: Version of the + schema the FieldPath is written + in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field + to select in the specified + API version. type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container - name: required for volumes, - optional for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the - output format of the exposed - resources, defaults to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic required: - - path + - fieldPath type: object - type: array - x-kubernetes-list-type: atomic - type: object - emptyDir: + x-kubernetes-map-type: atomic + mode: + 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 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 be other mode bits set. + format: int32 + type: integer + path: + description: 'Required: Path is the + relative path name of the file + to be created. Must not be absolute + or contain the ''..'' path. Must + be utf-8 encoded. The first item + of the relative path must not + start with ''..''' + type: string + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + properties: + containerName: + description: 'Container name: + required for volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource + to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + description: |- + emptyDir represents a temporary directory that shares a pod's lifetime. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + properties: + medium: description: |- - emptyDir represents a temporary directory that shares a pod's lifetime. + 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 - properties: - medium: - description: |- - 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 - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - 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 - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string description: |- - ephemeral represents a volume that is handled by a cluster storage driver. - The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, - and deleted when the pod is removed. + 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 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: |- + ephemeral represents a volume that is handled by a cluster storage driver. + The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + and deleted when the pod is removed. - Use this if: - a) the volume is only needed while the pod runs, - b) features of normal volumes like restoring from snapshot or capacity - tracking are needed, - c) the storage driver is specified through a storage class, and - d) the storage driver supports dynamic volume provisioning through - a PersistentVolumeClaim (see EphemeralVolumeSource for more - information on the connection between this volume type - and PersistentVolumeClaim). + Use this if: + a) the volume is only needed while the pod runs, + b) features of normal volumes like restoring from snapshot or capacity + tracking are needed, + c) the storage driver is specified through a storage class, and + d) the storage driver supports dynamic volume provisioning through + a PersistentVolumeClaim (see EphemeralVolumeSource for more + information on the connection between this volume type + and PersistentVolumeClaim). - Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. + Use PersistentVolumeClaim or one of the vendor-specific + APIs for volumes that persist for longer than the lifecycle + of an individual pod. - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to - be used that way - see the documentation of the driver for - more information. + Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + be used that way - see the documentation of the driver for + more information. - A pod can use both types of ephemeral volumes and - persistent volumes at the same time. - properties: - volumeClaimTemplate: - description: |- - Will be used to create a stand-alone PVC to provision the volume. - The pod in which this EphemeralVolumeSource is embedded will be the - owner of the PVC, i.e. the PVC will be deleted together with the - pod. The name of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` array - entry. Pod validation will reject the pod if the concatenated name - is not valid for a PVC (for example, too long). + A pod can use both types of ephemeral volumes and + persistent volumes at the same time. + properties: + volumeClaimTemplate: + description: |- + Will be used to create a stand-alone PVC to provision the volume. + The pod in which this EphemeralVolumeSource is embedded will be the + owner of the PVC, i.e. the PVC will be deleted together with the + pod. The name of the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` array + entry. Pod validation will reject the pod if the concatenated name + is not valid for a PVC (for example, too long). - An existing PVC with that name that is not owned by the pod - will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC is - meant to be used by the pod, the PVC has to updated with an - owner reference to the pod once the pod exists. Normally - this should not be necessary, but it may be useful when - manually reconstructing a broken cluster. + An existing PVC with that name that is not owned by the pod + will *not* be used for the pod to avoid using an unrelated + volume by mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created PVC is + meant to be used by the pod, the PVC has to updated with an + owner reference to the pod once the pod exists. Normally + this should not be necessary, but it may be useful when + manually reconstructing a broken cluster. - This field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. + This field is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. - Required, must not be nil. + Required, must not be nil. + properties: + metadata: + description: |- + May contain labels and annotations that will be copied into the PVC + when creating it. No other fields are allowed and will be rejected during + validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: |- + The specification for the PersistentVolumeClaim. The entire content is + copied unchanged into the PVC that gets created from this + template. The same fields as in a PersistentVolumeClaim + are also valid here. properties: - metadata: + accessModes: description: |- - May contain labels and annotations that will be copied into the PVC - when creating it. No other fields are allowed and will be rejected during - validation. + accessModes contains the desired access modes the volume should have. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + description: |- + 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. + properties: + 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. + type: string + kind: + description: Kind is the type + of resource being referenced + type: string + name: + description: Name is the name + of resource being referenced + type: string + required: + - kind + - name type: object - spec: + x-kubernetes-map-type: atomic + dataSourceRef: description: |- - The specification for the PersistentVolumeClaim. The entire content is - copied unchanged into the PVC that gets created from this - template. The same fields as in a PersistentVolumeClaim - are also valid here. + 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. + 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 + allows any non-core object, as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values (dropping them), dataSourceRef + preserves all values, and generates an error if a disallowed value is + specified. + * While dataSource only allows local objects, dataSourceRef allows objects + in any namespaces. + (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. properties: - accessModes: + apiGroup: description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: + 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. + type: string + kind: + description: Kind is the type + of resource being referenced + type: string + name: + description: Name is the name + of resource being referenced + type: string + namespace: description: |- - 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. - properties: - 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. - type: string - kind: - description: Kind is the - type of resource being - referenced - type: string - name: - description: Name is the - name of resource being - referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: + 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. + type: string + required: + - kind + - name + type: object + resources: + description: |- + resources represents the minimum resources the volume should have. + 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 the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - 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. - 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 - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (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. - properties: - 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. - type: string - kind: - description: Kind is the - type of resource being - referenced - type: string - name: - description: Name is the - name of resource being - referenced - type: string - namespace: - 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. - type: string - required: - - kind - - name + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - resources: + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - resources represents the minimum resources the volume should have. - 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 the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - 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/ - type: object + 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/ type: object - selector: - description: selector is a - label query over volumes - to consider for binding. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: + type: object + selector: + description: selector is a label + query over volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is + the label key that + the selector applies + to. + type: string + operator: description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label key - that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - 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 or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - 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/ - type: string - volumeMode: + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is - the binding reference to - the PersistentVolume backing - this claim. - type: string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel - resource that is attached to a kubelet's - host machine and then exposed to the - pod. - properties: - fsType: - description: |- - 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. - type: string - lun: - description: 'lun is Optional: FC - target lun number' - format: int32 - type: integer - readOnly: - description: |- - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: - FC target worldwide names (WWNs)' - items: - type: string - type: array - x-kubernetes-list-type: atomic - wwids: - description: |- - wwids Optional: FC volume world wide identifiers (wwids) - Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - flexVolume: - description: |- - flexVolume represents a generic volume resource that is - provisioned/attached using an exec based plugin. - Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. - properties: - driver: - description: driver is the name of - the driver to use for this volume. - type: string - fsType: - description: |- - 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. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: - this field holds extra command options - if any.' - type: object - readOnly: - description: |- - readOnly is Optional: defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - 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. - properties: - name: - default: "" + x-kubernetes-map-type: atomic + storageClassName: + description: |- + storageClassName is the name of the StorageClass required by the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + type: string + 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 or nil value indicates that no + VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, + this field can be reset to its previous value (including nil) to cancel the modification. + 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/ + type: string + volumeMode: description: |- - 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 + volumeMode defines what type of volume is required by the claim. + Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the + binding reference to the PersistentVolume + backing this claim. type: string type: object - x-kubernetes-map-type: atomic required: - - driver + - spec type: object - flocker: + type: object + fc: + description: fc represents a Fibre Channel + resource that is attached to a kubelet's + host machine and then exposed to the pod. + properties: + fsType: description: |- - flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. - Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. - properties: - datasetName: - description: |- - datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker - should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID - of the dataset. This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: + 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. + type: string + lun: + description: 'lun is Optional: FC target + lun number' + format: int32 + type: integer + readOnly: description: |- - gcePersistentDisk represents a GCE Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree - gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - properties: - fsType: - description: |- - 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 - type: string - partition: - description: |- - 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 - format: int32 - type: integer - pdName: - description: |- - 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 - type: string - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: boolean - required: - - pdName - type: object - gitRepo: + readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: + FC target worldwide names (WWNs)' + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: description: |- - 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. - properties: - directory: - description: |- - 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. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit - hash for the specified revision. - type: string - required: - - repository + wwids Optional: FC volume world wide identifiers (wwids) + Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + description: |- + flexVolume represents a generic volume resource that is + provisioned/attached using an exec based plugin. + Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + properties: + driver: + description: driver is the name of the + driver to use for this volume. + type: string + fsType: + description: |- + 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. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this + field holds extra command options if + any.' type: object - glusterfs: + readOnly: description: |- - glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. - Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + readOnly is Optional: defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: |- + 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. properties: - endpoints: - description: endpoints is the endpoint - name that details Glusterfs topology. - type: string - path: + name: + default: "" description: |- - path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + 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 type: string - readOnly: - description: |- - 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 - type: boolean - required: - - endpoints - - path type: object - hostPath: + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: |- + flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + properties: + datasetName: + description: |- + datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + should be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of + the dataset. This is unique identifier + of a Flocker dataset + type: string + type: object + gcePersistentDisk: + description: |- + gcePersistentDisk represents a GCE Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + properties: + fsType: + description: |- + 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 + type: string + partition: + description: |- + 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 + format: int32 + type: integer + pdName: + description: |- + 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 + type: string + readOnly: + description: |- + readOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + type: boolean + required: + - pdName + type: object + gitRepo: + description: |- + 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. + properties: + directory: + description: |- + 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. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash + for the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: |- + glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + properties: + endpoints: + description: endpoints is the endpoint + name that details Glusterfs topology. + type: string + path: + description: |- + path is the Glusterfs volume path. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + type: string + readOnly: + description: |- + 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 + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: |- + 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: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + properties: + path: description: |- - 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. + 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 - properties: - path: - description: |- - 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 - type: string - type: - description: |- - type for HostPath Volume - Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - type: string - required: - - path - type: object - image: + type: string + type: description: |- - image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. - The volume is resolved at pod startup depending on which PullPolicy value is provided: + type for HostPath Volume + Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + type: string + required: + - path + type: object + image: + description: |- + image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. + The volume is resolved at pod startup depending on which PullPolicy value is provided: - - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. - A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. - The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. - The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. - The volume will be mounted read-only (ro). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. - The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. - properties: - pullPolicy: - description: |- - Policy for pulling OCI objects. Possible values are: - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. - type: string - reference: - description: |- - Required: Image or artifact reference to be used. - Behaves in the same way as pod.spec.containers[*].image. - Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. - 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 and StatefulSets. - type: string - type: object - iscsi: + The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. + A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. + The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. + The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. + The volume will be mounted read-only (ro). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. + The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. + properties: + pullPolicy: + description: |- + Policy for pulling OCI objects. Possible values are: + Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + type: string + reference: + description: |- + Required: Image or artifact reference to be used. + Behaves in the same way as pod.spec.containers[*].image. + Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. + 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 and StatefulSets. + type: string + type: object + iscsi: + description: |- + iscsi represents an ISCSI 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/#iscsi + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines + whether support iSCSI Discovery CHAP + authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether + support iSCSI Session CHAP authentication + type: boolean + fsType: + description: |- + 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 + type: string + initiatorName: + description: |- + initiatorName is the custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + : will be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified + Name. + type: string + iscsiInterface: + default: default + description: |- + iscsiInterface is the interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target + Lun number. + format: int32 + type: integer + portals: + description: |- + 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). + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: description: |- - iscsi represents an ISCSI 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/#iscsi + readOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret + for iSCSI target and initiator authentication properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines - whether support iSCSI Discovery - CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines - whether support iSCSI Session CHAP - authentication - type: boolean - fsType: - description: |- - 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 - type: string - initiatorName: - description: |- - initiatorName is the custom iSCSI Initiator Name. - If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI - Qualified Name. - type: string - iscsiInterface: - default: default - description: |- - iscsiInterface is the interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI - Target Lun number. - format: int32 - type: integer - portals: - description: |- - 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). - items: - type: string - type: array - x-kubernetes-list-type: atomic - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP - Secret for iSCSI target and initiator - authentication - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: + name: + default: "" description: |- - 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). + 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 type: string - required: - - iqn - - lun - - targetPortal type: object - name: + x-kubernetes-map-type: atomic + targetPortal: description: |- - 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 + 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). type: string - nfs: + required: + - iqn + - lun + - targetPortal + type: object + name: + description: |- + 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 + type: string + nfs: + description: |- + nfs represents an NFS mount on the host that shares a pod's lifetime + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + properties: + path: description: |- - nfs represents an NFS mount on the host that shares a pod's lifetime + path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - properties: - path: - description: |- - path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - readOnly: - description: |- - 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 - type: boolean - server: - description: |- - server is the hostname or IP address of the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - required: - - path - - server - type: object - persistentVolumeClaim: + type: string + readOnly: + description: |- + 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 + type: boolean + server: + description: |- + server is the hostname or IP address of the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: |- + persistentVolumeClaimVolumeSource represents a reference to a + PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + properties: + claimName: description: |- - persistentVolumeClaimVolumeSource represents a reference to 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 - properties: - claimName: - description: |- - 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 - type: string - readOnly: - description: |- - readOnly Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: + type: string + readOnly: description: |- - photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. - Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. - properties: - fsType: - description: |- - 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. - type: string - pdID: - description: pdID is the ID that identifies - Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: + readOnly Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: |- + photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. + properties: + fsType: + description: |- + 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. + type: string + pdID: + description: pdID is the ID that identifies + Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: |- + portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + are redirected to the pxd.portworx.com CSI driver. + properties: + fsType: + description: |- + 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. + type: string + readOnly: + description: |- + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies + a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one + resources secrets, configmaps, and downward + API + properties: + defaultMode: description: |- - portworxVolume represents a portworx volume attached and mounted on kubelets host machine. - Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type - are redirected to the pxd.portworx.com CSI driver. - properties: - fsType: - description: |- - 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. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies - a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in - one resources secrets, configmaps, and - downward API - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - sources: - description: |- - sources is the list of volume projections. Each entry in this list - handles one source. - items: + 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. + format: int32 + type: integer + sources: + description: |- + sources is the list of volume projections. Each entry in this list + handles one source. + items: + description: |- + Projection that may be projected along with other supported volume types. + Exactly one of these fields must be set. + properties: + clusterTrustBundle: description: |- - Projection that may be projected along with other supported volume types. - Exactly one of these fields must be set. - properties: - clusterTrustBundle: - description: |- - ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field - of ClusterTrustBundle objects in an auto-updating file. + ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field + of ClusterTrustBundle objects in an auto-updating file. - Alpha, gated by the ClusterTrustBundleProjection feature gate. + Alpha, gated by the ClusterTrustBundleProjection feature gate. - ClusterTrustBundle objects can either be selected by name, or by the - combination of signer name and a label selector. + ClusterTrustBundle objects can either be selected by name, or by the + combination of signer name and a label selector. - Kubelet 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. - properties: - labelSelector: - description: |- - 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". - properties: - matchExpressions: - description: matchExpressions - is a list of label - selector requirements. - The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label - key that the - selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: |- - Select a single ClusterTrustBundle by object name. Mutually-exclusive - with signerName and labelSelector. - type: string - optional: - description: |- - 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. - type: boolean - path: - description: Relative path - from the volume root to - write the bundle. - type: string - signerName: - description: |- - Select all ClusterTrustBundles that match this signer name. - Mutually-exclusive with name. The contents of all selected - ClusterTrustBundles will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information - about the configMap data to - project + Kubelet 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. + properties: + labelSelector: + description: |- + 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". properties: - items: - description: |- - 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 keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. items: - description: Maps a string - key to a path within - a volume. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is - the key to project. + the label key that + the selector applies + to. type: string - mode: + operator: description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - key - - path + - operator type: object type: array x-kubernetes-list-type: atomic - name: - default: "" + matchLabels: + additionalProperties: + type: string description: |- - 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 - type: string - optional: - description: optional specify - whether the ConfigMap - or its keys must be defined - type: boolean + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information - about the downwardAPI data - to project - properties: - items: - description: Items is a - list of DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile - represents information - to create the file containing - the pod field + name: + description: |- + Select a single ClusterTrustBundle by object name. Mutually-exclusive + with signerName and labelSelector. + type: string + optional: + description: |- + 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. + type: boolean + path: + description: Relative path from + the volume root to write the + bundle. + type: string + signerName: + description: |- + Select all ClusterTrustBundles that match this signer name. + Mutually-exclusive with name. The contents of all selected + ClusterTrustBundles will be unified and deduplicated. + type: string + required: + - path + type: object + configMap: + description: configMap information + about the configMap data to project + properties: + items: + description: |- + 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 keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string + key to a path within a volume. + properties: + key: + description: key is the + key to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional specify + whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information + about the downwardAPI data to + project + properties: + items: + description: Items is a list + of DownwardAPIVolume file + items: + description: DownwardAPIVolumeFile + represents information to + create the file containing + the pod field + properties: + fieldRef: + description: 'Required: + Selects a field of the + pod: only annotations, + labels, name, namespace + and uid are supported.' properties: - fieldRef: - description: 'Required: - Selects a field - of the pod: only - annotations, labels, - name, namespace - and uid are supported.' - properties: - apiVersion: - description: Version - of the schema - the FieldPath - is written in - terms of, defaults - to "v1". - type: string - fieldPath: - description: Path - of the field - to select in - the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - 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 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 be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: - Path is the relative - path name of the - file to be created. - Must not be absolute - or contain the ''..'' - path. Must be utf-8 - encoded. The first - item of the relative - path must not start - with ''..''' + apiVersion: + description: Version + of the schema the + FieldPath is written + in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path + of the field to + select in the specified + API version. type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container - name: required - for volumes, - optional for - env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format - of the exposed - resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic required: - - path + - fieldPath type: object - type: array - x-kubernetes-list-type: atomic - type: object - podCertificate: - description: |- - Projects an auto-rotating credential bundle (private key and certificate - chain) that the pod can use either as a TLS client or server. - - Kubelet generates a private key and uses it to send a - PodCertificateRequest to the named signer. Once the signer approves the - request and issues a certificate chain, Kubelet writes the key and - certificate chain to the pod filesystem. The pod does not start until - certificates have been issued for each podCertificate projected volume - source in its spec. - - Kubelet will begin trying to rotate the certificate at the time indicated - by the signer using the PodCertificateRequest.Status.BeginRefreshAt - timestamp. - - Kubelet can write a single file, indicated by the credentialBundlePath - field, or separate files, indicated by the keyPath and - certificateChainPath fields. - - The credential bundle is a single file in PEM format. The first PEM - entry is the private key (in PKCS#8 format), and the remaining PEM - entries are the certificate chain issued by the signer (typically, - signers will return their certificate chain in leaf-to-root order). - - Prefer using the credential bundle format, since your application code - can read it atomically. If you use keyPath and certificateChainPath, - your application must make two separate file reads. If these coincide - with a certificate rotation, it is possible that the private key and leaf - certificate you read may not correspond to each other. Your application - will need to check for this condition, and re-read until they are - consistent. - - The named signer controls chooses the format of the certificate it - issues; consult the signer implementation's documentation to learn how to - use the certificates it issues. - properties: - certificateChainPath: - description: |- - Write the certificate chain at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - credentialBundlePath: - description: |- - Write the credential bundle at this path in the projected volume. - - The credential bundle is a single file that contains multiple PEM blocks. - The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private - key. - - The remaining blocks are CERTIFICATE blocks, containing the issued - certificate chain from the signer (leaf and any intermediates). - - Using credentialBundlePath lets your Pod's application code make a single - atomic read that retrieves a consistent key and certificate chain. If you - project them to separate files, your application code will need to - additionally check that the leaf certificate was issued to the key. - type: string - keyPath: - description: |- - Write the key at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - keyType: - description: |- - The type of keypair Kubelet will generate for the pod. - - Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", - "ECDSAP521", and "ED25519". - type: string - maxExpirationSeconds: - description: |- - maxExpirationSeconds is the maximum lifetime permitted for the - certificate. - - Kubelet copies this value verbatim into the PodCertificateRequests it - generates for this projection. - - If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver - will reject values shorter than 3600 (1 hour). The maximum allowable - value is 7862400 (91 days). - - The signer implementation is then free to issue a certificate with any - lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 - seconds (1 hour). This constraint is enforced by kube-apiserver. - `kubernetes.io` signers will never issue certificates with a lifetime - longer than 24 hours. - format: int32 - type: integer - signerName: - description: Kubelet's generated - CSRs will be addressed - to this signer. - type: string - userAnnotations: - additionalProperties: + x-kubernetes-map-type: atomic + mode: + 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 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 be other mode bits set. + format: int32 + type: integer + path: + description: 'Required: + Path is the relative + path name of the file + to be created. Must + not be absolute or contain + the ''..'' path. Must + be utf-8 encoded. The + first item of the relative + path must not start + with ''..''' type: string - description: |- - userAnnotations allow pod authors to pass additional information to - the signer implementation. Kubernetes does not restrict or validate this - metadata in any way. - - These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of - the PodCertificateRequest objects that Kubelet creates. - - Entries are subject to the same validation as object metadata annotations, - with the addition that all keys must be domain-prefixed. No restrictions - are placed on values, except an overall size limitation on the entire field. - - Signers should document the keys and values they support. Signers should - deny requests that contain keys they do not recognize. - type: object - required: - - keyType - - signerName - type: object - secret: - description: secret information - about the secret data to project - properties: - items: - description: |- - 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 will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string - key to a path within - a volume. + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. properties: - key: - description: key is - the key to project. + containerName: + description: 'Container + name: required for + volumes, optional + for env vars' type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format + of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - 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 - type: string - optional: - description: optional field - specify whether the Secret - or its key must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken - is information about the serviceAccountToken - data to project - properties: - audience: - description: |- - 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. - type: string - expirationSeconds: - description: |- - 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 percent of - its time to live or if the token is older than 24 hours.Defaults to 1 hour - and must be at least 10 minutes. - format: int64 - type: integer - path: - description: |- - path is the path relative to the mount point of the file to project the - token into. - type: string - required: - - path - type: object - type: object - type: array - x-kubernetes-list-type: atomic - type: object - quobyte: - description: |- - quobyte represents a Quobyte mount on the host that shares a pod's lifetime. - Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. - properties: - group: - description: |- - group to map volume access to - Default is no group - type: string - readOnly: - description: |- - readOnly here will force the Quobyte volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: |- - 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 - type: string - tenant: - description: |- - tenant owning the given Quobyte volume in the Backend - Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: |- - user to map volume access to - Defaults to serivceaccount user - type: string - volume: - description: volume is a string that - references an already created Quobyte - volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: |- - rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. - Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. - properties: - fsType: - description: |- - 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 - type: string - image: - description: |- - image is the rados image name. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - keyring: - default: /etc/ceph/keyring - description: |- - 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 - type: string - monitors: - description: |- - monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - pool: - default: rbd - description: |- - pool is the rados pool name. - Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - readOnly: - description: |- - 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 - type: boolean - secretRef: - description: |- - 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 - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - user: - default: admin - description: |- - user is the rados user name. - Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - required: - - image - - monitors - type: object - scaleIO: - description: |- - scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. - properties: - fsType: - default: xfs - description: |- - 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". - type: string - gateway: - description: gateway is the host address - of the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the - name of the ScaleIO Protection Domain - for the configured storage. - type: string - readOnly: - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef references to the secret for ScaleIO user and other - sensitive information. If this is not provided, Login operation will fail. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable - SSL communication with Gateway, - default false - type: boolean - storageMode: - default: ThinProvisioned - description: |- - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO - Storage Pool associated with the - protection domain. - type: string - system: - description: system is the name of - the storage system as configured - in ScaleIO. - type: string - volumeName: - description: |- - volumeName is the name of a volume already created in the ScaleIO system - that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: |- - secret represents a secret that should populate this volume. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - items: - description: |- - 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 will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to - a path within a volume. + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + description: |- + Projects an auto-rotating credential bundle (private key and certificate + chain) that the pod can use either as a TLS client or server. + + Kubelet generates a private key and uses it to send a + PodCertificateRequest to the named signer. Once the signer approves the + request and issues a certificate chain, Kubelet writes the key and + certificate chain to the pod filesystem. The pod does not start until + certificates have been issued for each podCertificate projected volume + source in its spec. + + Kubelet will begin trying to rotate the certificate at the time indicated + by the signer using the PodCertificateRequest.Status.BeginRefreshAt + timestamp. + + Kubelet can write a single file, indicated by the credentialBundlePath + field, or separate files, indicated by the keyPath and + certificateChainPath fields. + + The credential bundle is a single file in PEM format. The first PEM + entry is the private key (in PKCS#8 format), and the remaining PEM + entries are the certificate chain issued by the signer (typically, + signers will return their certificate chain in leaf-to-root order). + + Prefer using the credential bundle format, since your application code + can read it atomically. If you use keyPath and certificateChainPath, + your application must make two separate file reads. If these coincide + with a certificate rotation, it is possible that the private key and leaf + certificate you read may not correspond to each other. Your application + will need to check for this condition, and re-read until they are + consistent. + + The named signer controls chooses the format of the certificate it + issues; consult the signer implementation's documentation to learn how to + use the certificates it issues. properties: - key: - description: key is the key - to project. + certificateChainPath: + description: |- + Write the certificate chain at this path in the projected volume. + + Most applications should use credentialBundlePath. When using keyPath + and certificateChainPath, your application needs to check that the key + and leaf certificate are consistent, because it is possible to read the + files mid-rotation. + type: string + credentialBundlePath: + description: |- + Write the credential bundle at this path in the projected volume. + + The credential bundle is a single file that contains multiple PEM blocks. + The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private + key. + + The remaining blocks are CERTIFICATE blocks, containing the issued + certificate chain from the signer (leaf and any intermediates). + + Using credentialBundlePath lets your Pod's application code make a single + atomic read that retrieves a consistent key and certificate chain. If you + project them to separate files, your application code will need to + additionally check that the leaf certificate was issued to the key. + type: string + keyPath: + description: |- + Write the key at this path in the projected volume. + + Most applications should use credentialBundlePath. When using keyPath + and certificateChainPath, your application needs to check that the key + and leaf certificate are consistent, because it is possible to read the + files mid-rotation. + type: string + keyType: + description: |- + The type of keypair Kubelet will generate for the pod. + + Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", + "ECDSAP521", and "ED25519". type: string - mode: + maxExpirationSeconds: description: |- - 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 be other mode bits set. + maxExpirationSeconds is the maximum lifetime permitted for the + certificate. + + Kubelet copies this value verbatim into the PodCertificateRequests it + generates for this projection. + + If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + will reject values shorter than 3600 (1 hour). The maximum allowable + value is 7862400 (91 days). + + The signer implementation is then free to issue a certificate with any + lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 + seconds (1 hour). This constraint is enforced by kube-apiserver. + `kubernetes.io` signers will never issue certificates with a lifetime + longer than 24 hours. format: int32 type: integer + signerName: + description: Kubelet's generated + CSRs will be addressed to + this signer. + type: string + userAnnotations: + additionalProperties: + type: string + description: |- + userAnnotations allow pod authors to pass additional information to + the signer implementation. Kubernetes does not restrict or validate this + metadata in any way. + + These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of + the PodCertificateRequest objects that Kubelet creates. + + Entries are subject to the same validation as object metadata annotations, + with the addition that all keys must be domain-prefixed. No restrictions + are placed on values, except an overall size limitation on the entire field. + + Signers should document the keys and values they support. Signers should + deny requests that contain keys they do not recognize. + type: object + required: + - keyType + - signerName + type: object + secret: + description: secret information + about the secret data to project + properties: + items: + description: |- + 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 will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string + key to a path within a volume. + properties: + key: + description: key is the + key to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional field + specify whether the Secret + or its key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken + is information about the serviceAccountToken + data to project + properties: + audience: + description: |- + 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. + type: string + expirationSeconds: + description: |- + 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 percent of + its time to live or if the token is older than 24 hours.Defaults to 1 hour + and must be at least 10 minutes. + format: int64 + type: integer path: description: |- - 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 '..'. + path is the path relative to the mount point of the file to project the + token into. type: string required: - - key - path type: object - type: array - x-kubernetes-list-type: atomic - optional: - description: optional field specify - whether the Secret or its keys must - be defined - type: boolean - secretName: + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + description: |- + quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + properties: + group: + description: |- + group to map volume access to + Default is no group + type: string + readOnly: + description: |- + readOnly here will force the Quobyte volume to be mounted with read-only permissions. + Defaults to false. + type: boolean + registry: + description: |- + 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 + type: string + tenant: + description: |- + tenant owning the given Quobyte volume in the Backend + Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: |- + user to map volume access to + Defaults to serivceaccount user + type: string + volume: + description: volume is a string that references + an already created Quobyte volume by + name. + type: string + required: + - registry + - volume + type: object + rbd: + description: |- + rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + properties: + fsType: + description: |- + 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 + type: string + image: + description: |- + image is the rados image name. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + keyring: + default: /etc/ceph/keyring + description: |- + 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 + type: string + monitors: + description: |- + monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + description: |- + pool is the rados pool name. + Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + readOnly: + description: |- + 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 + type: boolean + secretRef: + description: |- + 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 + properties: + name: + default: "" description: |- - secretName is the name of the secret in the pod's namespace to use. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + 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 type: string type: object - storageos: + x-kubernetes-map-type: atomic + user: + default: admin + description: |- + user is the rados user name. + Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + required: + - image + - monitors + type: object + scaleIO: + description: |- + scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + properties: + fsType: + default: xfs description: |- - storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + 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". + type: string + gateway: + description: gateway is the host address + of the ScaleIO API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name + of the ScaleIO Protection Domain for + the configured storage. + type: string + readOnly: + description: |- + readOnly Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: |- + secretRef references to the secret for ScaleIO user and other + sensitive information. If this is not provided, Login operation will fail. properties: - fsType: - description: |- - 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. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef specifies the secret to use for obtaining the StorageOS API - credentials. If not specified, default values will be attempted. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: |- - volumeName is the human-readable name of the StorageOS volume. Volume - names are only unique within a namespace. - type: string - volumeNamespace: + name: + default: "" description: |- - 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 override the default behaviour. - Set to "default" if you are not using namespaces within StorageOS. - Namespaces that do not pre-exist within StorageOS will be created. + 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 type: string type: object - vsphereVolume: + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable + SSL communication with Gateway, default + false + type: boolean + storageMode: + default: ThinProvisioned + description: |- + storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO + Storage Pool associated with the protection + domain. + type: string + system: + description: system is the name of the + storage system as configured in ScaleIO. + type: string + volumeName: + description: |- + volumeName is the name of a volume already created in the ScaleIO system + that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: |- + secret represents a secret that should populate this volume. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + properties: + defaultMode: + description: |- + 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. + format: int32 + type: integer + items: + description: |- + 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 will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a + path within a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + description: optional field specify whether + the Secret or its keys must be defined + type: boolean + secretName: + description: |- + secretName is the name of the secret in the pod's namespace to use. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + type: string + type: object + storageos: + description: |- + storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + properties: + fsType: + description: |- + 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. + type: string + readOnly: description: |- - vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. - Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type - are redirected to the csi.vsphere.vmware.com CSI driver. + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: |- + secretRef specifies the secret to use for obtaining the StorageOS API + credentials. If not specified, default values will be attempted. properties: - fsType: + name: + default: "" description: |- - 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. - type: string - storagePolicyID: - description: storagePolicyID is the - storage Policy Based Management - (SPBM) profile ID associated with - the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is - the storage Policy Based Management - (SPBM) profile name. - type: string - volumePath: - description: volumePath is the path - that identifies vSphere volume vmdk + 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 type: string - required: - - volumePath type: object + x-kubernetes-map-type: atomic + volumeName: + description: |- + volumeName is the human-readable name of the StorageOS volume. Volume + names are only unique within a namespace. + type: string + volumeNamespace: + description: |- + 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 override the default behaviour. + Set to "default" if you are not using namespaces within StorageOS. + Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: |- + vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + are redirected to the csi.vsphere.vmware.com CSI driver. + properties: + fsType: + description: |- + 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. + type: string + storagePolicyID: + description: storagePolicyID is the storage + Policy Based Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the + storage Policy Based Management (SPBM) + profile name. + type: string + volumePath: + description: volumePath is the path that + identifies vSphere volume vmdk + type: string required: - - name + - volumePath type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - required: - - containers - type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - containers type: object type: object - type: object - name: - type: string - nodeSelector: - additionalProperties: - type: string - type: object - prepareScript: - type: string - raw: - properties: - artifact: + version: type: string - entrypoint: - items: - type: string - type: array - environment: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array + required: + - carrier + - version type: object - role: - type: string - runScript: - type: string - sshPublicKey: - type: string - tags: - items: - description: |- - JobTag 表示一个任务标签,由 key 和多个 value 组成。 - key 和每个 value 长度均不超过 10 个字符;一个任务最多 10 个标签; - 每个标签最多包含 10 个不同的 value。 - properties: - key: - type: string - values: - items: - type: string - type: array - required: - - key - - values - type: object - type: array - tensorBoardDir: - type: string required: + - placement - role + - runtime + - workload type: object type: array type: object @@ -9021,10 +8965,29 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map endTime: format: date-time type: string + observedGeneration: + description: |- + ObservedGeneration 是 Job 控制器最近一次完成调谐时所观测到的 + metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + format: int64 + type: integer phase: + description: |- + JobPhase 是 Job 的聚合生命周期阶段,由控制面 Job 控制器根据其 Task 的 + 观测状态推导得出。取值集合必须与 Job 状态机保持一致。 + enum: + - Pending + - Running + - Succeeded + - Failed + - Stopped type: string startTime: format: date-time @@ -9037,6 +9000,15 @@ spec: name: type: string phase: + description: |- + TaskPhase 是单个 Task 的生命周期阶段,由数据面 Agent 观测本地工作负载后上报。 + 取值集合与 JobPhase 对齐,Task 没有独立的 Stopping 中间态。 + enum: + - Pending + - Running + - Succeeded + - Failed + - Stopped type: string type: object type: array diff --git a/api/config/crd/bases/rlinf.io_nodes.yaml b/api/config/crd/bases/rlinf.io_nodes.yaml index 4a77756..3cf7815 100644 --- a/api/config/crd/bases/rlinf.io_nodes.yaml +++ b/api/config/crd/bases/rlinf.io_nodes.yaml @@ -16,7 +16,20 @@ spec: singular: node scope: Namespaced versions: - - name: v1alpha1 + - additionalPrinterColumns: + - jsonPath: .spec.agentType + name: Agent + type: string + - jsonPath: .status.phase + name: Phase + type: string + - jsonPath: .spec.unschedulable + name: Unschedulable + type: boolean + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 schema: openAPIV3Schema: properties: @@ -40,6 +53,10 @@ spec: spec: properties: agentType: + enum: + - Kubernetes + - Docker + - Raw type: string unschedulable: type: boolean @@ -47,6 +64,7 @@ spec: status: properties: addresses: + description: Addresses 是节点地址列表(InternalIP / Hostname 等)。 items: description: NodeAddress contains information for the node's address. properties: @@ -80,6 +98,68 @@ spec: x-kubernetes-int-or-string: true description: ResourceList is a set of (resource name, quantity) pairs. type: object + conditions: + description: |- + Conditions 记录节点的结构化状态结论,当前仅包含 ConditionTypeReady。 + 它由观测(而非 Spec)驱动,因此不填写 ObservedGeneration。 + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map diskPressure: type: boolean events: @@ -87,6 +167,7 @@ spec: Events 由数据面 node-agent 上报节点相关 Kubernetes Event(如 DiskPressure 等 Warning 事件及镜像拉取/调度相关事件)。控制面 Task reconciler 在 Task 处于 Pending 期间聚合各节点事件到 Task.status.events,供前端展示。 + 条目数量由 node-agent 侧裁剪(最多保留 50 条)。 items: description: |- NodeEvent represents a Kubernetes Event observed on a node that is relevant @@ -117,7 +198,20 @@ spec: - type type: object type: array + lastHeartbeatTime: + description: |- + LastHeartbeatTime 是控制面 Node Reconciler 从 Agent Lease 读取到的最近一次 + 心跳续约时间;数据面不写入本字段。 + format: date-time + type: string + lastStatusChangeTime: + description: |- + LastStatusChangeTime 是 Phase 最近一次发生变化的时间,与 LastHeartbeatTime + 同由控制面 Node Reconciler 写入,用于区分「长时间保持同一状态」与「刚刚翻转」。 + format: date-time + type: string nodeInfo: + description: NodeInfo 是节点基础信息,由数据面 Agent 上报;控制面不写入本字段。 properties: agentVersion: type: string @@ -129,8 +223,13 @@ spec: type: string type: object phase: + description: Phase 是节点连通性聚合阶段,由数据面 node-agent 上报。 + enum: + - Online + - Offline type: string pullProgress: + description: PullProgress 是节点上正在进行的镜像拉取进度,由 node-agent 上报。 items: description: PullProgress captures the progress of an in-flight image pull on a node. @@ -158,6 +257,10 @@ spec: type: object type: array reason: + description: |- + Reason 是 Phase 的机器可读原因(CamelCase),与 Conditions 中 + ConditionTypeReady 的 Reason 同源,供列表视图直接展示。 + 该字段与 Conditions 均由数据面 node-agent 独占写入。 type: string storage: description: NodeStorageStatus reports kubelet filesystem usage in diff --git a/api/config/crd/bases/rlinf.io_pods.yaml b/api/config/crd/bases/rlinf.io_pods.yaml index 33b7133..b845d4b 100644 --- a/api/config/crd/bases/rlinf.io_pods.yaml +++ b/api/config/crd/bases/rlinf.io_pods.yaml @@ -20,7 +20,7 @@ spec: - jsonPath: .spec.domain name: Domain type: string - - jsonPath: .spec.node + - jsonPath: .status.node name: Node type: string - jsonPath: .status.phase diff --git a/api/config/crd/bases/rlinf.io_tasks.yaml b/api/config/crd/bases/rlinf.io_tasks.yaml index 8121a33..537348c 100644 --- a/api/config/crd/bases/rlinf.io_tasks.yaml +++ b/api/config/crd/bases/rlinf.io_tasks.yaml @@ -17,8 +17,11 @@ spec: scope: Namespaced versions: - additionalPrinterColumns: - - jsonPath: .spec.agentType - name: Agent + - jsonPath: .spec.runtime.kind + name: Runtime + type: string + - jsonPath: .spec.workload.kind + name: Workload type: string - jsonPath: .status.phase name: Phase @@ -49,145 +52,408 @@ spec: type: object spec: properties: - agentType: + downstreamName: type: string - docker: + environments: + items: + description: |- + TaskEnvironment 表示 Task 请求的一种可扩展环境能力。 + Type 是带所有者作用域的稳定类型标识,Version 表示该类型的参数版本。 + Parameters 必须由对应的已注册 Handler 严格解码和校验;未知类型、未知版本或 + 非法参数必须在产生任何外部副作用前被拒绝。 + properties: + parameters: + x-kubernetes-preserve-unknown-fields: true + type: + type: string + version: + type: string + required: + - type + - version + type: object + type: array + placement: + description: TaskPlacementSpec describes scheduling constraints for + the workload. properties: - containers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - environment: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - image: - type: string - name: - type: string - volumes: - items: - properties: - source: - type: string - target: - type: string - type: object - type: array - type: object - type: array + nodeSelector: + additionalProperties: + type: string + type: object type: object - domain: - type: string - downstreamName: + role: + description: |- + TaskRole 描述 Task 在业务编排中的角色,用于前端分组与展示。 + 该字段当前不在 CRD 层做枚举校验:它可能承载上层编排框架的自定义角色名, + 收窄取值会阻止合法的既有数据写入。请勿据此推断取值的封闭集合。 type: string - kubernetes: + runtime: + description: |- + TaskRuntimeSpec selects the runtime implementation and instance that lowers + the common Pod template. Name is a stable runtime instance identifier; it is + not a display name or proof of ownership. + properties: + kind: + description: |- + RuntimeKind 表示负责执行 Task 工作负载的 Runtime 类型。 + CRD 有意不限制该字符串的枚举值,使 Docker、Raw 等 Runtime 可以在不修改 + Task Schema 的情况下扩展。Agent 必须在产生任何外部副作用前,通过已注册的 + Provider 和能力校验拒绝未知或尚未支持的 Runtime 类型。 + type: string + name: + type: string + required: + - kind + type: object + suspended: + type: boolean + tags: + items: + description: |- + JobTag 表示一个任务标签,由 key 和多个 value 组成。 + 标签的个数与 key/value 长度上限不在 CRD Schema 层封闭,由 Gateway 在写入 + 路径上校验,详见开发者文档的 API 约定。 + properties: + key: + type: string + values: + items: + type: string + type: array + required: + - key + - values + type: object + type: array + workload: + description: |- + TaskWorkloadSpec is the common workload declaration for every runtime. + Kubernetes applies the Pod template natively. Future Docker and Raw providers + lower the subset they support and reject unsupported fields before producing + external effects. properties: - workload: + carrier: + description: |- + TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a + workload. Type and Version identify a carrier contract; Parameters remain + opaque until the selected Adapter or Runtime implementation strictly decodes + them. Carrier identifiers are open strings, not CRD enums. properties: - kind: + parameters: + x-kubernetes-preserve-unknown-fields: true + type: type: string - pvcSizeGbMap: - additionalProperties: - format: int32 - type: integer - description: 'Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests - instead.' - type: object - pvcStorageMap: - additionalProperties: - type: string - description: 'Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.StorageClassName - instead.' - type: object - replicas: - format: int32 - type: integer - template: - description: PodTemplateSpec describes the data a pod should - have when created from a template + version: + type: string + required: + - type + - version + type: object + kind: + description: |- + WorkloadKind identifies the workload semantics independently of its Runtime + carrier. The CRD deliberately keeps this identifier open; registered + Adapters must reject unsupported kinds before producing external effects. + type: string + parameters: + x-kubernetes-preserve-unknown-fields: true + template: + description: PodTemplateSpec describes the data a pod should have + when created from a template + properties: + metadata: + description: |- + Standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata properties: - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + annotations: + additionalProperties: + type: string type: object - spec: + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: |- + Specification of the desired behavior of the pod. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + activeDeadlineSeconds: description: |- - Specification of the desired behavior of the pod. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling constraints properties: - activeDeadlineSeconds: - description: |- - Optional duration in seconds the pod may be active on the node relative to - StartTime before the system will actively try to mark it failed and kill associated containers. - Value must be a positive integer. - format: int64 - type: integer - affinity: - description: If specified, the pod's scheduling constraints + nodeAffinity: + description: Describes node affinity scheduling rules + for the pod. properties: - nodeAffinity: - description: Describes node affinity scheduling - rules for the pod. + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node matches the corresponding matchExpressions; the + node(s) with the highest sum are the most preferred. + items: + description: |- + An empty preferred scheduling term matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector term, associated + with the corresponding weight. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated with matching + the corresponding nodeSelectorTerm, in + the range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from its node. properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. + nodeSelectorTerms: + description: Required. A list of node selector + terms. The terms are ORed. items: description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + A null or empty node selector term matches no objects. The requirements of + them are ANDed. + The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list of node selector + requirements by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list of node selector + requirements by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The label key that + the selector applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity scheduling rules + (e.g. co-locate this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added per-node + to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. properties: - preference: - description: A node selector term, associated - with the corresponding weight. + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. properties: matchExpressions: - description: A list of node selector - requirements by node's labels. + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. items: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: The label key - that the selector applies + description: key is the label + key that the selector applies to. type: string operator: description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- - An array of string values. If the operator is In or NotIn, + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -198,31 +464,77 @@ spec: type: object type: array x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. items: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: The label key - that the selector applies + description: key is the label + key that the selector applies to. type: string operator: description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- - An array of string values. If the operator is In or NotIn, + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -233,325 +545,246 @@ spec: type: object type: array x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object x-kubernetes-map-type: atomic - weight: - description: Weight associated with - matching the corresponding nodeSelectorTerm, - in the range 1-100. - format: int32 - type: integer - required: - - preference - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. A list of node - selector terms. The terms are ORed. - items: + namespaces: description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list of node selector - requirements by node's labels. - items: + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key - that the selector applies - to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list of node selector - requirements by node's fields. - items: + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The label key - that the selector applies - to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity scheduling - rules (e.g. co-locate this pod in the same node, - zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added - per-node to find the most preferred node(s) + type: object + x-kubernetes-map-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. properties: - podAffinityTerm: - description: Required. A pod affinity - term, associated with the corresponding - weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - 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. - items: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + description: Describes pod anti-affinity scheduling + rules (e.g. avoid putting this pod in the same node, + zone, etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the anti-affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, etc.), + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of all of the matched + WeightedPodAffinityTerm fields are added per-node + to find the most preferred node(s) + properties: + podAffinityTerm: + description: Required. A pod affinity term, + associated with the corresponding weight. properties: labelSelector: description: |- @@ -705,627 +938,376 @@ spec: required: - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity scheduling - rules (e.g. avoid putting this pod in the same - node, zone, etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and subtracting - "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights of all of the matched - WeightedPodAffinityTerm fields are added - per-node to find the most preferred node(s) + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the anti-affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the anti-affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. properties: - podAffinityTerm: - description: Required. A pod affinity - term, associated with the corresponding - weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - 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. - items: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: + values: description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array x-kubernetes-list-type: atomic - 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. - items: + matchLabels: + additionalProperties: type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions is - a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label - key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - automountServiceAccountToken: - description: AutomountServiceAccountToken indicates - whether a service account token should be automatically - mounted. - type: boolean - containers: - description: |- - List of containers belonging to the pod. - Containers cannot currently be added or removed. - There must be at least one container in a Pod. - Cannot be updated. - items: - description: A single application container that - you want to run within a pod. - properties: - args: - description: |- - 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - env: - description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment - variable present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. + x-kubernetes-map-type: atomic + 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. + items: type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". + type: array + x-kubernetes-list-type: atomic + 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. + items: type: string - valueFrom: - description: Source for the environment - variable's value. Cannot be used if - value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether the - ConfigMap or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in - terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified API - version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions is a list + of label selector requirements. The + requirements are ANDed. + items: description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + description: key is the label + key that the selector applies + to. type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: + operator: description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The name of the volume - mount containing the env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - name: - default: "" + values: description: |- - 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 - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - key + - operator type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource represents the - source of a set of ConfigMaps or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - 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 + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - optional: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken indicates whether + a service account token should be automatically mounted. + type: boolean + containers: + description: |- + List of containers belonging to the pod. + Containers cannot currently be added or removed. + There must be at least one container in a Pod. + Cannot be updated. + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: |- + 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + 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 + type: string + optional: description: Specify whether the ConfigMap - must be defined + or its key must be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string name: default: "" description: |- @@ -1337,277 +1319,102 @@ spec: type: string optional: description: Specify whether the Secret - must be defined + or its key must be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - 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 and StatefulSets. - type: string - imagePullPolicy: - description: |- - 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 - type: string - lifecycle: - description: |- - Actions that the management system should take in response to container lifecycle events. - Cannot be updated. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration - that the container should sleep. - properties: - seconds: - description: Seconds is the number - of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration - that the container should sleep. - properties: - seconds: - description: Seconds is the number - of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps or Secrets + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + 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 and StatefulSets. + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: |- + Actions that the management system should take in response to container lifecycle events. + Cannot be updated. + properties: + postStart: description: |- - Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command to @@ -1625,32 +1432,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -1705,27 +1486,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number of + seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name to @@ -1743,91 +1520,18 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - name: - description: |- - Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: |- - 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. - 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. - items: - description: ContainerPort represents a network - port in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the - external port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: + preStop: description: |- - Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command to @@ -1845,32 +1549,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -1925,27 +1603,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number of + seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name to @@ -1963,989 +1637,1194 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - resizePolicy: + stopSignal: description: |- - Resources resize policy for the container. - This field cannot be set on ephemeral containers. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: |- + Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: description: |- - Compute Resources required by this container. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. properties: - claims: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. + description: HTTPHeader describes a custom + header to be used in HTTP probes properties: name: 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. + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + value: + description: The header field value type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: 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/ - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - restartPolicy: - description: |- - RestartPolicy defines the restart behavior of individual containers in a pod. - This overrides the pod-level restart policy. When this field is not specified, - the restart behavior is defined by the Pod's restart policy and the container type. - Additionally, 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. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. The rules are evaluated in - order. Once a rule matches a container exit condition, the remaining - rules are ignored. If no rule matches the container exit condition, - the Container-level restart policy determines the whether the container - is restarted or not. Constraints on the rules: - - At most 20 rules are allowed. - - Rules can have the same action. - - Identical rules are not forbidden in validations. - When rules are specified, container MUST set RestartPolicy explicitly - even it if matches the Pod's RestartPolicy. - items: - description: ContainerRestartRule describes - how a container exit is handled. - properties: - action: - description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. - type: string - exitCodes: - description: Represents the exit codes - to check on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object - required: - - action - type: object - type: array - x-kubernetes-list-type: atomic - securityContext: + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: description: |- - SecurityContext defines the security options the container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - allowPrivilegeEscalation: - description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: - description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' type: string - readOnlyRootFilesystem: + port: + anyOf: + - type: integer + - type: string description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: |- + 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. + 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. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: |- + Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: + service: + default: "" description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level - label that applies to the container. - type: string - role: - description: Role is a SELinux role - label that applies to the container. - type: string - type: - description: Type is a SELinux type - label that applies to the container. - type: string - user: - description: User is a SELinux user - label that applies to the container. - type: string - type: object - seccompProfile: + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - startupProbe: - description: |- - StartupProbe indicates that the Pod has successfully initialized. - If specified, no other probes are executed until this completes successfully. - If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - exec: - description: Exec specifies a command to - execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an HTTP GET - request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object - stdin: + terminationGracePeriodSeconds: description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block - devices to be used by the container. + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: |- + Resources resize policy for the container. + This field cannot be set on ephemeral containers. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Compute Resources required by this container. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. items: - description: volumeDevice describes a mapping - of a raw block device within a container. + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. properties: - devicePath: - description: devicePath is the path inside - of the container that the device will - be mapped to. - type: string name: - description: name must match the name - of a persistentVolumeClaim in the pod + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string required: - - devicePath - name type: object type: array x-kubernetes-list-map-keys: - - devicePath + - name x-kubernetes-list-type: map - volumeMounts: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting - of a Volume within a container. + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + RestartPolicy defines the restart behavior of individual containers in a pod. + This overrides the pod-level restart policy. When this field is not specified, + the restart behavior is defined by the Pod's restart policy and the container type. + Additionally, 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. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. The rules are evaluated in + order. Once a rule matches a container exit condition, the remaining + rules are ignored. If no rule matches the container exit condition, + the Container-level restart policy determines the whether the container + is restarted or not. Constraints on the rules: + - At most 20 rules are allowed. + - Rules can have the same action. + - Identical rules are not forbidden in validations. + When rules are specified, container MUST set RestartPolicy explicitly + even it if matches the Pod's RestartPolicy. + items: + description: ContainerRestartRule describes how + a container exit is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the exit codes to + check on container exits. properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name - of a Volume. - type: string - readOnly: + operator: description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If 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. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. type: string - subPathExpr: + values: description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set required: - - mountPath - - name + - operator type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + SecurityContext defines the security options the container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + properties: + allowPrivilegeEscalation: description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS - resolver options of a pod. + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + 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. properties: - name: + localhostProfile: description: |- - Name is this DNS resolver option's name. - Required. + 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". type: string - value: - description: Value is this DNS resolver - option's value. + type: + description: |- + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. type: string + required: + - type type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - 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 'ClusterFirstWithHostNet'. - type: string - enableServiceLinks: - description: |- - EnableServiceLinks indicates whether information about services should be injected into pod's - environment variables, matching the syntax of Docker links. - Optional: Defaults to true. - type: boolean - ephemeralContainers: - description: |- - List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing - pod to perform user-initiated actions such as debugging. This list cannot be specified when - creating a pod, and it cannot be modified by updating the pod spec. In order to add an - ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. - items: - description: |- - An EphemeralContainer is a temporary container that you may add to an existing Pod for - user-initiated activities such as debugging. Ephemeral containers have no resource or - scheduling guarantees, and they will not be restarted when they exit or when a Pod is - removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the - Pod to exceed its resource allocation. - - To add an ephemeral container, use the ephemeralcontainers subresource of an existing - Pod. Ephemeral containers may not be removed or restarted. - properties: - args: - description: |- - Arguments to the entrypoint. - The 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - Entrypoint array. Not executed within a shell. - The 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - env: + capabilities: description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents an environment - variable present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type type: string - valueFrom: - description: Source for the environment - variable's value. Cannot be used if - value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether the - ConfigMap or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in - terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified API - version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. - type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The name of the volume - mount containing the env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: |- + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: |- + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: + description: |- + HostProcess determines if a container should be run as a 'Host 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. + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + startupProbe: + description: |- + StartupProbe indicates that the Pod has successfully initialized. + If specified, no other probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + when it might take a long time to load data or warm a cache, than during steady-state operation. + This cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource represents the - source of a set of ConfigMaps or Secrets + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will be + mapped to. + type: string + name: + description: name must match the name of a + persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match the Name of a + Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. + + If ReadOnly is false, this field has no meaning and must be unspecified. + + If 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. + + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). + + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + dnsConfig: + description: |- + Specifies the DNS parameters of a pod. + Parameters specified here will be merged to the generated DNS + configuration based on DNSPolicy. + properties: + nameservers: + description: |- + A list of DNS name server IP addresses. + This will be appended to the base nameservers generated from DNSPolicy. + Duplicated nameservers will be removed. + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + description: |- + A list of DNS resolver options. + This will be merged with the base options generated from DNSPolicy. + Duplicated entries will be removed. Resolution options given in Options + will override those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption defines DNS resolver + options of a pod. + properties: + name: + description: |- + Name is this DNS resolver option's name. + Required. + type: string + value: + description: Value is this DNS resolver option's + value. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + description: |- + A list of DNS search domains for host-name lookup. + This will be appended to the base search paths generated from DNSPolicy. + Duplicated search paths will be removed. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + 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 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: |- + EnableServiceLinks indicates whether information about services should be injected into pod's + environment variables, matching the syntax of Docker links. + Optional: Defaults to true. + type: boolean + ephemeralContainers: + description: |- + List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + pod to perform user-initiated actions such as debugging. This list cannot be specified when + creating a pod, and it cannot be modified by updating the pod spec. In order to add an + ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + items: + description: |- + An EphemeralContainer is a temporary container that you may add to an existing Pod for + user-initiated activities such as debugging. Ephemeral containers have no resource or + scheduling guarantees, and they will not be restarted when they exit or when a Pod is + removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the + Pod to exceed its resource allocation. + + To add an ephemeral container, use the ephemeralcontainers subresource of an existing + Pod. Ephemeral containers may not be removed or restarted. + properties: + args: + description: |- + Arguments to the entrypoint. + The 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + Entrypoint array. Not executed within a shell. + The 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. properties: - configMapRef: - description: The ConfigMap to select from + configMapKeyRef: + description: Selects a key of a ConfigMap. properties: + key: + description: The key to select. + type: string name: default: "" description: |- @@ -2957,294 +2836,206 @@ spec: type: string optional: description: Specify whether the ConfigMap - must be defined + or its key must be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: - name: - default: "" + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: description: |- - 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 + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. type: string optional: - description: Specify whether the Secret - must be defined + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key type: object x-kubernetes-map-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - Container image name. - More info: https://kubernetes.io/docs/concepts/containers/images - type: string - imagePullPolicy: + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps or Secrets + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + Container image name. + More info: https://kubernetes.io/docs/concepts/containers/images + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: Lifecycle is not allowed for ephemeral + containers. + properties: + postStart: description: |- - 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 - type: string - lifecycle: - description: Lifecycle is not allowed for ephemeral - containers. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration - that the container should sleep. - properties: - seconds: - description: Seconds is the number - of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration - that the container should sleep. - properties: - seconds: - description: Seconds is the number - of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: - description: Probes are not allowed for ephemeral - containers. + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command to @@ -3262,32 +3053,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -3342,27 +3107,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number of + seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name to @@ -3380,81 +3141,18 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - name: + preStop: description: |- - Name of the ephemeral container specified as a DNS_LABEL. - This name must be unique among all containers, init containers and ephemeral containers. - type: string - ports: - description: Ports are not allowed for ephemeral - containers. - items: - description: ContainerPort represents a network - port in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the - external port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: Probes are not allowed for ephemeral - containers. + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command to @@ -3472,32 +3170,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -3552,27 +3224,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number of + seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name to @@ -3590,361 +3258,1411 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - resizePolicy: - description: Resources resize policy for the - container. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: description: |- - Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources - already allocated to the pod. + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. properties: - claims: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - This field is immutable. It can only be set for containers. + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. + description: HTTPHeader describes a custom + header to be used in HTTP probes properties: name: 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. + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + value: + description: The header field value type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: 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/ - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - restartPolicy: + initialDelaySeconds: description: |- - Restart policy for the container to manage the restart behavior of each - container within a pod. - You cannot set this field on ephemeral containers. - type: string - restartPolicyRules: + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. You cannot set this field on - ephemeral containers. - items: - description: ContainerRestartRule describes - how a container exit is handled. - properties: - action: - description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the ephemeral container specified as a DNS_LABEL. + This name must be unique among all containers, init containers and ephemeral containers. + type: string + ports: + description: Ports are not allowed for ephemeral + containers. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - exitCodes: - description: Represents the exit codes - to check on container exits. + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes properties: - operator: + name: description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set required: - - operator + - name + - value type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy for the container. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + already allocated to the pod. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. + properties: + name: + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string required: - - action + - name type: object type: array - x-kubernetes-list-type: atomic - securityContext: + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + Restart policy for the container to manage the restart behavior of each + container within a pod. + You cannot set this field on ephemeral containers. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. You cannot set this field on + ephemeral containers. + items: + description: ContainerRestartRule describes how + a container exit is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the exit codes to + check on container exits. + properties: + operator: + description: |- + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. + type: string + values: + description: |- + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + Optional: SecurityContext defines the security options the ephemeral container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + properties: + allowPrivilegeEscalation: + description: |- + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + appArmorProfile: description: |- - Optional: SecurityContext defines the security options the ephemeral container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + 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. properties: - allowPrivilegeEscalation: + localhostProfile: description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - appArmorProfile: + 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". + type: string + type: 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type + type: object + capabilities: + description: |- + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. type: string - readOnlyRootFilesystem: + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. + HostProcess determines if a container should be run as a 'Host 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. type: boolean - runAsGroup: - description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: + runAsUserName: description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: + type: string + type: object + type: object + startupProbe: + description: Probes are not allowed for ephemeral + containers. + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level - label that applies to the container. - type: string - role: - description: Role is a SELinux role - label that applies to the container. - type: string - type: - description: Type is a SELinux type - label that applies to the container. - type: string - user: - description: User is a SELinux user - label that applies to the container. - type: string - type: object - seccompProfile: + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object - startupProbe: - description: Probes are not allowed for ephemeral - containers. + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + targetContainerName: + description: |- + If set, the name of the container from PodSpec that this ephemeral container targets. + The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + If not set then the ephemeral container uses the namespaces configured in the Pod spec. + + The container runtime must implement support for this feature. If the runtime does not + support namespace targeting then the result of setting this field is undefined. + type: string + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will be + mapped to. + type: string + name: + description: name must match the name of a + persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. + Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match the Name of a + Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. + + If ReadOnly is false, this field has no meaning and must be unspecified. + + If 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. + + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). + + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + hostAliases: + description: |- + HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + file if specified. + items: + description: |- + HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the + pod's hosts file. + properties: + hostnames: + description: Hostnames for the above IP address. + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + description: IP address of the host file entry. + type: string + required: + - ip + type: object + type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map + hostIPC: + description: |- + Use the host's ipc namespace. + Optional: Default to false. + type: boolean + hostNetwork: + description: |- + Host networking requested for this pod. Use the host's network namespace. + When using HostNetwork you should specify ports so the scheduler is aware. + When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, + and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. + Default to false. + type: boolean + hostPID: + description: |- + Use the host's pid namespace. + Optional: Default to false. + type: boolean + hostUsers: + description: |- + Use the host's user namespace. + Optional: Default to true. + If set to true or not present, the pod will be run in the host user namespace, useful + for when the pod needs a feature only available to the host user namespace, such as + loading a kernel module with CAP_SYS_MODULE. + When set to false, a new userns is created for the pod. Setting false is useful for + mitigating container breakout vulnerabilities even allowing users to run their + containers as root without actually having root privileges on the host. + type: boolean + hostname: + description: |- + Specifies the hostname of the Pod + If not specified, the pod's hostname will be set to a system-defined value. + type: string + hostnameOverride: + description: |- + HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. + This field only specifies the pod's hostname and does not affect its DNS records. + When this field is set to a non-empty string: + - It takes precedence over the values set in `hostname` and `subdomain`. + - The Pod's hostname will be set to this value. + - `setHostnameAsFQDN` must be nil or set to false. + - `hostNetwork` must be set to false. + + This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. + Requires the HostnameOverride feature gate to be enabled. + type: string + imagePullSecrets: + description: |- + ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + default: "" + description: |- + 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 + type: string + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + initContainers: + description: |- + List of initialization containers belonging to the pod. + Init containers are executed in order prior to containers being started. If any + init container fails, the pod is considered to have failed and is handled according + to its restartPolicy. The name for an init container or normal container must be + unique among all containers. + Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + The resourceRequirements of an init container are taken into account during scheduling + by finding the highest request/limit for each resource type, and then using the max of + that value or the sum of the normal containers. Limits are applied to init containers + in a similar fashion. + Init containers cannot currently be added or removed. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + items: + description: A single application container that you + want to run within a pod. + properties: + args: + description: |- + 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents an environment + variable present in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the environment variable's + value. Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the ConfigMap + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + description: |- + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name of the volume + mount containing the env file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a key of a secret + in the pod's namespace + properties: + key: + description: The key of the secret + to select from. Must be a valid + secret key. + type: string + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the Secret + or its key must be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents the source + of a set of ConfigMaps or Secrets + properties: + configMapRef: + description: The ConfigMap to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the ConfigMap + must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether the Secret + must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + 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 and StatefulSets. + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: |- + Actions that the management system should take in response to container lifecycle events. + Cannot be updated. + properties: + postStart: + description: |- + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies a command to @@ -3962,32 +4680,123 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. + httpGet: + description: HTTPGet specifies an HTTP GET + request to perform. properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in + the request. HTTP allows repeated + headers. + items: + description: HTTPHeader describes + a custom header to be used in HTTP + probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field + value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" + anyOf: + - type: integer + - type: string description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number of + seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. + properties: + host: + description: 'Optional: Host name to + connect to, defaults to the pod IP.' type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true required: - port type: object + type: object + preStop: + description: |- + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + properties: + exec: + description: Exec specifies a command to + execute in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object httpGet: description: HTTPGet specifies an HTTP GET request to perform. @@ -4042,27 +4851,23 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents a duration + that the container should sleep. + properties: + seconds: + description: Seconds is the number of + seconds to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: Host name to @@ -4080,494 +4885,444 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: + type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: |- + Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. format: int32 type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - stdin: + initialDelaySeconds: description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - targetContainerName: + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: description: |- - If set, the name of the container from PodSpec that this ephemeral container targets. - The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. - If not set then the ephemeral container uses the namespaces configured in the Pod spec. - - The container runtime must implement support for this feature. If the runtime does not - support namespace targeting then the result of setting this field is undefined. - type: string - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block - devices to be used by the container. - items: - description: volumeDevice describes a mapping - of a raw block device within a container. - properties: - devicePath: - description: devicePath is the path inside - of the container that the device will - be mapped to. - type: string - name: - description: name must match the name - of a persistentVolumeClaim in the pod - type: string - required: - - devicePath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - devicePath - x-kubernetes-list-type: map - volumeMounts: + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: description: |- - Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. - Cannot be updated. - items: - description: VolumeMount describes a mounting - of a Volume within a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name - of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If 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. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. - type: string - required: - - name + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - hostAliases: - description: |- - HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts - file if specified. - items: + name: description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: + Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: |- + 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. + 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. + items: + description: ContainerPort represents a network + port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP to bind the external + port to. type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - x-kubernetes-list-map-keys: - - ip - x-kubernetes-list-type: map - hostIPC: - description: |- - Use the host's ipc namespace. - Optional: Default to false. - type: boolean - hostNetwork: - description: |- - Host networking requested for this pod. Use the host's network namespace. - When using HostNetwork you should specify ports so the scheduler is aware. - When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, - and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. - Default to false. - type: boolean - hostPID: - description: |- - Use the host's pid namespace. - Optional: Default to false. - type: boolean - hostUsers: - description: |- - Use the host's user namespace. - Optional: Default to true. - If set to true or not present, the pod will be run in the host user namespace, useful - for when the pod needs a feature only available to the host user namespace, such as - loading a kernel module with CAP_SYS_MODULE. - When set to false, a new userns is created for the pod. Setting false is useful for - mitigating container breakout vulnerabilities even allowing users to run their - containers as root without actually having root privileges on the host. - type: boolean - hostname: - description: |- - Specifies the hostname of the Pod - If not specified, the pod's hostname will be set to a system-defined value. - type: string - hostnameOverride: - description: |- - HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. - This field only specifies the pod's hostname and does not affect its DNS records. - When this field is set to a non-empty string: - - It takes precedence over the values set in `hostname` and `subdomain`. - - The Pod's hostname will be set to this value. - - `setHostnameAsFQDN` must be nil or set to false. - - `hostNetwork` must be set to false. - - This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. - Requires the HostnameOverride feature gate to be enabled. - type: string - imagePullSecrets: - description: |- - ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. - If specified, these secrets will be passed to individual puller implementations for them to use. - More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod - items: + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. + Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes properties: - name: - default: "" + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: description: |- - 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 - type: string + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. + properties: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - initContainers: - description: |- - List of initialization containers belonging to the pod. - Init containers are executed in order prior to containers being started. If any - init container fails, the pod is considered to have failed and is handled according - to its restartPolicy. The name for an init container or normal container must be - unique among all containers. - Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. - The resourceRequirements of an init container are taken into account during scheduling - by finding the highest request/limit for each resource type, and then using the max of - that value or the sum of the normal containers. Limits are applied to init containers - in a similar fashion. - Init containers cannot currently be added or removed. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that - you want to run within a pod. - properties: - args: - description: |- - 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: + resizePolicy: + description: |- + Resources resize policy for the container. + This field cannot be set on ephemeral containers. + items: + description: ContainerResizePolicy represents + resource resize policy for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. type: string - type: array - x-kubernetes-list-type: atomic - env: + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Compute Resources required by this container. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: description: |- - List of environment variables to set in the container. - Cannot be updated. + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. items: - description: EnvVar represents an environment - variable present in a Container. + description: ResourceClaim references one + entry in PodSpec.ResourceClaims. properties: name: description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. + 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. type: string - value: + request: description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string - valueFrom: - description: Source for the environment - variable's value. Cannot be used if - value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether the - ConfigMap or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in - terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified API - version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. - type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The name of the volume - mount containing the env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret - in the pod's namespace - properties: - key: - description: The key of the secret - to select from. Must be a valid - secret key. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether the - Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object required: - name type: object @@ -4575,1363 +5330,840 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource represents the - source of a set of ConfigMaps or Secrets + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + RestartPolicy defines the restart behavior of individual containers in a pod. + This overrides the pod-level restart policy. When this field is not specified, + the restart behavior is defined by the Pod's restart policy and the container type. + Additionally, 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. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. The rules are evaluated in + order. Once a rule matches a container exit condition, the remaining + rules are ignored. If no rule matches the container exit condition, + the Container-level restart policy determines the whether the container + is restarted or not. Constraints on the rules: + - At most 20 rules are allowed. + - Rules can have the same action. + - Identical rules are not forbidden in validations. + When rules are specified, container MUST set RestartPolicy explicitly + even it if matches the Pod's RestartPolicy. + items: + description: ContainerRestartRule describes how + a container exit is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the exit codes to + check on container exits. properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether the ConfigMap - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: + operator: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify whether the Secret - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic + values: + description: |- + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - 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 and StatefulSets. - type: string - imagePullPolicy: + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + SecurityContext defines the security options the container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + properties: + allowPrivilegeEscalation: description: |- - 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 - type: string - lifecycle: + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + appArmorProfile: description: |- - Actions that the management system should take in response to container lifecycle events. - Cannot be updated. + 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. properties: - postStart: + localhostProfile: description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration - that the container should sleep. - properties: - seconds: - description: Seconds is the number - of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies a command - to execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set - in the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents a duration - that the container should sleep. - properties: - seconds: - description: Seconds is the number - of seconds to sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: Host name - to connect to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: + 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". + type: string + type: description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. type: string + required: + - type type: object - livenessProbe: + capabilities: description: |- - Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. properties: - exec: - description: Exec specifies a command to - execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: + add: + description: Added capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability represent POSIX + capabilities type + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux level label + that applies to the container. + type: string + role: + description: Role is a SELinux role label + that applies to the container. + type: string + type: + description: Type is a SELinux type label + that applies to the container. + type: string + user: + description: User is a SELinux user label + that applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an HTTP GET - request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the + name of the GMSA credential spec to use. + type: string + hostProcess: description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: + HostProcess determines if a container should be run as a 'Host 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. + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + startupProbe: + description: |- + StartupProbe indicates that the Pod has successfully initialized. + If specified, no other probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + when it might take a long time to load data or warm a cache, than during steady-state operation. + This cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies a command to execute + in the container. + properties: + command: description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies a GRPC HealthCheckRequest. + properties: + port: + description: Port number of the gRPC service. + Number must be in the range 1 to 65535. format: int32 type: integer - tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: + service: + default: "" description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies an HTTP GET request + to perform. + properties: + host: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers to set in the + request. HTTP allows repeated headers. + items: + description: HTTPHeader describes a custom + header to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access on the HTTP + server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - name: + initialDelaySeconds: description: |- - Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: |- - 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. - 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. - items: - description: ContainerPort represents a network - port in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host IP to bind the - external port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: |- - Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe fails. - Cannot be updated. + Number of seconds after the container has started before liveness probes are initiated. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies a connection + to a TCP port. properties: - exec: - description: Exec specifies a command to - execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an HTTP GET - request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: + host: + description: 'Optional: Host name to connect + to, defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object - resizePolicy: + terminationGracePeriodSeconds: description: |- - Resources resize policy for the container. - This field cannot be set on ephemeral containers. - items: - description: ContainerResizePolicy represents - resource resize policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: description: |- - Compute Resources required by this container. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the list of block + devices to be used by the container. + items: + description: volumeDevice describes a mapping + of a raw block device within a container. + properties: + devicePath: + description: devicePath is the path inside + of the container that the device will be + mapped to. + type: string + name: + description: name must match the name of a + persistentVolumeClaim in the pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes a mounting + of a Volume within a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match the Name of a + Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. - This field depends on the - DynamicResourceAllocation feature gate. + If ReadOnly is false, this field has no meaning and must be unspecified. - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - 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. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - 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/ - type: object - type: object - restartPolicy: - description: |- - RestartPolicy defines the restart behavior of individual containers in a pod. - This overrides the pod-level restart policy. When this field is not specified, - the restart behavior is defined by the Pod's restart policy and the container type. - Additionally, 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. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. The rules are evaluated in - order. Once a rule matches a container exit condition, the remaining - rules are ignored. If no rule matches the container exit condition, - the Container-level restart policy determines the whether the container - is restarted or not. Constraints on the rules: - - At most 20 rules are allowed. - - Rules can have the same action. - - Identical rules are not forbidden in validations. - When rules are specified, container MUST set RestartPolicy explicitly - even it if matches the Pod's RestartPolicy. - items: - description: ContainerRestartRule describes - how a container exit is handled. - properties: - action: - description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. - type: string - exitCodes: - description: Represents the exit codes - to check on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object - required: - - action - type: object - type: array - x-kubernetes-list-type: atomic - securityContext: - description: |- - SecurityContext defines the security options the container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ - properties: - allowPrivilegeEscalation: - description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: - description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed capabilities - items: - description: Capability represent - POSIX capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level - label that applies to the container. - type: string - role: - description: Role is a SELinux role - label that applies to the container. - type: string - type: - description: Type is a SELinux type - label that applies to the container. - type: string - user: - description: User is a SELinux user - label that applies to the container. - type: string - type: object - seccompProfile: - description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: + If 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. - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: - description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA credential - spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - startupProbe: - description: |- - StartupProbe indicates that the Pod has successfully initialized. - If specified, no other probes are executed until this completes successfully. - If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - properties: - exec: - description: Exec specifies a command to - execute in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies a GRPC HealthCheckRequest. - properties: - port: - description: Port number of the gRPC - service. Number must be in the range - 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies an HTTP GET - request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom headers to set in - the request. HTTP allows repeated - headers. - items: - description: HTTPHeader describes - a custom header to be used in HTTP - probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies a connection - to a TCP port. - properties: - host: - description: 'Optional: Host name to - connect to, defaults to the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - type: object - stdin: - description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: - description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is the list of block - devices to be used by the container. - items: - description: volumeDevice describes a mapping - of a raw block device within a container. - properties: - devicePath: - description: devicePath is the path inside - of the container that the device will - be mapped to. - type: string - name: - description: name must match the name - of a persistentVolumeClaim in the pod - type: string - required: - - devicePath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - devicePath - x-kubernetes-list-type: map - volumeMounts: - description: |- - Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes a mounting - of a Volume within a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name - of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + nodeName: + description: |- + NodeName indicates in which node this pod is scheduled. + If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. + Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. + This field should not be used to express a desire for the pod to be scheduled on a specific node. + https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + type: string + nodeSelector: + additionalProperties: + type: string + description: |- + NodeSelector is a selector which must be true for the pod to fit on a node. + Selector which must match a node's labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + type: object + x-kubernetes-map-type: atomic + os: + description: |- + Specifies the OS of the containers in the pod. + Some pod and container fields are restricted if this is set. - If ReadOnly is false, this field has no meaning and must be unspecified. + If the OS field is set to linux, the following fields must be unset: + -securityContext.windowsOptions - If 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. + If the OS field is set to windows, following fields must be unset: + - spec.hostPID + - spec.hostIPC + - spec.hostUsers + - spec.resources + - spec.securityContext.appArmorProfile + - spec.securityContext.seLinuxOptions + - spec.securityContext.seccompProfile + - spec.securityContext.fsGroup + - spec.securityContext.fsGroupChangePolicy + - spec.securityContext.sysctls + - spec.shareProcessNamespace + - spec.securityContext.runAsUser + - spec.securityContext.runAsGroup + - spec.securityContext.supplementalGroups + - spec.securityContext.supplementalGroupsPolicy + - spec.containers[*].securityContext.appArmorProfile + - spec.containers[*].securityContext.seLinuxOptions + - spec.containers[*].securityContext.seccompProfile + - spec.containers[*].securityContext.capabilities + - spec.containers[*].securityContext.readOnlyRootFilesystem + - spec.containers[*].securityContext.privileged + - spec.containers[*].securityContext.allowPrivilegeEscalation + - spec.containers[*].securityContext.procMount + - spec.containers[*].securityContext.runAsUser + - spec.containers[*].securityContext.runAsGroup + properties: + name: + description: |- + Name is the name of the operating system. The currently supported values are linux and windows. + Additional value may be defined in future and can be one of: + https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + Clients should expect to handle additional values and treat unrecognized values in this field as os: null + type: string + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + This field will be autopopulated at admission time by the RuntimeClass admission controller. If + the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + The RuntimeClass admission controller will reject Pod create requests which have the overhead already + set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + type: object + preemptionPolicy: + description: |- + PreemptionPolicy is the Policy for preempting pods with lower priority. + One of Never, PreemptLowerPriority. + Defaults to PreemptLowerPriority if unset. + type: string + priority: + description: |- + The priority value. Various system components use this field to find the + priority of the pod. When Priority Admission Controller is enabled, it + prevents users from setting this field. The admission controller populates + this field from PriorityClassName. + The higher the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: |- + If specified, indicates the pod's priority. "system-node-critical" and + "system-cluster-critical" are two special keywords which indicate the + highest priorities with the former being the highest priority. Any other + name must be defined by creating a PriorityClass object with that name. + If not specified, the pod priority will be default or zero if there is no + default. + type: string + readinessGates: + description: |- + If specified, all readiness gates will be evaluated for pod readiness. + A pod is ready when all its containers are ready AND + all conditions specified in the readiness gates have status equal to "True" + More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + items: + description: PodReadinessGate contains the reference + to a pod condition + properties: + conditionType: + description: ConditionType refers to a condition + in the pod's condition list with matching type. + type: string + required: + - conditionType + type: object + type: array + x-kubernetes-list-type: atomic + resourceClaims: + description: |- + ResourceClaims defines which ResourceClaims must be allocated + and reserved before the Pod is allowed to start. The resources + will be made available to those containers which consume them + by name. - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). + This is a stable field but requires that the + DynamicResourceAllocation feature gate is enabled. - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: + This field is immutable. + items: + description: |- + PodResourceClaim references exactly one ResourceClaim, either directly + or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim + for the pod. + + It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. + Containers that need access to the ResourceClaim reference it with this name. + + When the DRAWorkloadResourceClaims feature gate is enabled and this Pod + belongs to a PodGroup, a PodResourceClaim is matched to a + PodGroupResourceClaim if all of their fields are equal (Name, + ResourceClaimName, and ResourceClaimTemplateName). A matched claim references + a single ResourceClaim shared across all Pods in the PodGroup, reserved for + the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual + Pods. + properties: + name: + description: |- + Name uniquely identifies this resource claim inside the pod. + This must be a DNS_LABEL. + type: string + resourceClaimName: + description: |- + ResourceClaimName is the name of a ResourceClaim object in the same + namespace as this pod. + + Exactly one of ResourceClaimName and ResourceClaimTemplateName must + be set. + type: string + resourceClaimTemplateName: + description: |- + ResourceClaimTemplateName is the name of a ResourceClaimTemplate + object in the same namespace as this pod. + + The template will be used to create a new ResourceClaim, which will + be bound to this pod. When this pod is deleted, the ResourceClaim + will also be deleted. The pod name and resource name, along with a + generated component, will be used to form a unique name for the + ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + + When the DRAWorkloadResourceClaims feature gate is enabled and the pod + belongs to a PodGroup that defines a PodGroupResourceClaim with the same + Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the + ResourceClaim generated for the PodGroup. All pods in the group that + define an equivalent PodResourceClaim matching the + PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same + generated ResourceClaim. ResourceClaims generated for a PodGroup are + owned by the PodGroup and their lifecycles are tied to the PodGroup + instead of any individual pod. + + This field is immutable and no changes will be made to the + corresponding ResourceClaim by the control plane after creating the + ResourceClaim. + + Exactly one of ResourceClaimName and ResourceClaimTemplateName must + be set. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + resources: + description: |- + Resources is the total amount of CPU and Memory resources required by all + containers in the pod. It supports specifying Requests and Limits for + "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. + + This field enables fine-grained control over resource allocation for the + entire pod, allowing resource sharing among containers in a pod. + + This is an alpha field and requires enabling the PodLevelResources feature + gate. + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry + in PodSpec.ResourceClaims. + properties: + name: + 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. + type: string + request: description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string required: - name @@ -5940,69 +6172,18 @@ spec: x-kubernetes-list-map-keys: - name x-kubernetes-list-type: map - nodeName: - description: |- - NodeName indicates in which node this pod is scheduled. - If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. - Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. - This field should not be used to express a desire for the pod to be scheduled on a specific node. - https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename - type: string - nodeSelector: + limits: additionalProperties: - type: string - description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - type: object - x-kubernetes-map-type: atomic - os: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - Specifies the OS of the containers in the pod. - Some pod and container fields are restricted if this is set. - - If the OS field is set to linux, the following fields must be unset: - -securityContext.windowsOptions - - If the OS field is set to windows, following fields must be unset: - - spec.hostPID - - spec.hostIPC - - spec.hostUsers - - spec.resources - - spec.securityContext.appArmorProfile - - spec.securityContext.seLinuxOptions - - spec.securityContext.seccompProfile - - spec.securityContext.fsGroup - - spec.securityContext.fsGroupChangePolicy - - spec.securityContext.sysctls - - spec.shareProcessNamespace - - spec.securityContext.runAsUser - - spec.securityContext.runAsGroup - - spec.securityContext.supplementalGroups - - spec.securityContext.supplementalGroupsPolicy - - spec.containers[*].securityContext.appArmorProfile - - spec.containers[*].securityContext.seLinuxOptions - - spec.containers[*].securityContext.seccompProfile - - spec.containers[*].securityContext.capabilities - - spec.containers[*].securityContext.readOnlyRootFilesystem - - spec.containers[*].securityContext.privileged - - spec.containers[*].securityContext.allowPrivilegeEscalation - - spec.containers[*].securityContext.procMount - - spec.containers[*].securityContext.runAsUser - - spec.containers[*].securityContext.runAsGroup - properties: - name: - description: |- - Name is the name of the operating system. The currently supported values are linux and windows. - Additional value may be defined in future and can be one of: - https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration - Clients should expect to handle additional values and treat unrecognized values in this field as os: null - type: string - required: - - name + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - overhead: + requests: additionalProperties: anyOf: - type: integer @@ -6010,1031 +6191,765 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- - Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. - This field will be autopopulated at admission time by the RuntimeClass admission controller. If - the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. - The RuntimeClass admission controller will reject Pod create requests which have the overhead already - set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value - defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. - More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + 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/ type: object - preemptionPolicy: + type: object + restartPolicy: + description: |- + Restart policy for all containers within the pod. + One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. + Default to Always. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + type: string + runtimeClassName: + description: |- + RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + empty definition that uses the default runtime handler. + More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + type: string + schedulerName: + description: |- + If specified, the pod will be dispatched by specified scheduler. + If not specified, the pod will be dispatched by default scheduler. + type: string + schedulingGates: + description: |- + SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the + scheduler will not attempt to schedule the pod. + + SchedulingGates can only be set at pod creation time, and be removed only afterwards. + items: + description: PodSchedulingGate is associated to a Pod + to guard its scheduling. + properties: + name: + description: |- + Name of the scheduling gate. + Each scheduling gate must have a unique name field. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + schedulingGroup: + description: |- + SchedulingGroup provides a reference to the immediate scheduling runtime + grouping object that this Pod belongs to. + This field is used by the scheduler to identify the group and apply the + correct group scheduling policies. The association with a group also + impacts other lifecycle aspects of a Pod that are relevant in a wider context + of scheduling like preemption, resource attachment, etc. If not specified, + the Pod is treated as a single unit in all of these aspects. + The group object referenced by this field may not exist at the time the + Pod is created. + This field is immutable, but a group object with the same name may be + recreated with different policies. Doing this during pod scheduling + may result in the placement not conforming to the expected policies. + properties: + podGroupName: description: |- - PreemptionPolicy is the Policy for preempting pods with lower priority. - One of Never, PreemptLowerPriority. - Defaults to PreemptLowerPriority if unset. + PodGroupName specifies the name of the standalone PodGroup object + that represents the runtime instance of this group. + Must be a DNS subdomain. type: string - priority: + type: object + securityContext: + description: |- + SecurityContext holds pod-level security attributes and common container settings. + Optional: Defaults to empty. See type description for default values of each field. + properties: + 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. + properties: + 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". + type: string + type: + description: |- + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type + type: object + fsGroup: description: |- - The priority value. Various system components use this field to find the - priority of the pod. When Priority Admission Controller is enabled, it - prevents users from setting this field. The admission controller populates - this field from PriorityClassName. - The higher the value, the higher the priority. - format: int32 + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: + + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + format: int64 type: integer - priorityClassName: + fsGroupChangePolicy: description: |- - If specified, indicates the pod's priority. "system-node-critical" and - "system-cluster-critical" are two special keywords which indicate the - highest priorities with the former being the highest priority. Any other - name must be defined by creating a PriorityClass object with that name. - If not specified, the pod priority will be default or zero if there is no - default. + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. type: string - readinessGates: + runAsGroup: description: |- - If specified, all readiness gates will be evaluated for pod readiness. - A pod is ready when all its containers are ready AND - all conditions specified in the readiness gates have status equal to "True" - More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates - items: - description: PodReadinessGate contains the reference - to a pod condition - properties: - conditionType: - description: ConditionType refers to a condition - in the pod's condition list with matching - type. - type: string - required: - - conditionType - type: object - type: array - x-kubernetes-list-type: atomic - resourceClaims: + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: description: |- - ResourceClaims defines which ResourceClaims must be allocated - and reserved before the Pod is allowed to start. The resources - will be made available to those containers which consume them - by name. - - This is a stable field but requires that the - DynamicResourceAllocation feature gate is enabled. - - This field is immutable. - items: - description: |- - PodResourceClaim references exactly one ResourceClaim, either directly - or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim - for the pod. - - It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. - Containers that need access to the ResourceClaim reference it with this name. - - When the DRAWorkloadResourceClaims feature gate is enabled and this Pod - belongs to a PodGroup, a PodResourceClaim is matched to a - PodGroupResourceClaim if all of their fields are equal (Name, - ResourceClaimName, and ResourceClaimTemplateName). A matched claim references - a single ResourceClaim shared across all Pods in the PodGroup, reserved for - the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual - Pods. - properties: - name: - description: |- - Name uniquely identifies this resource claim inside the pod. - This must be a DNS_LABEL. - type: string - resourceClaimName: - description: |- - ResourceClaimName is the name of a ResourceClaim object in the same - namespace as this pod. + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxChangePolicy: + description: |- + seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + Valid values are "MountOption" and "Recursive". - Exactly one of ResourceClaimName and ResourceClaimTemplateName must - be set. - type: string - resourceClaimTemplateName: - description: |- - ResourceClaimTemplateName is the name of a ResourceClaimTemplate - object in the same namespace as this pod. + "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. - The template will be used to create a new ResourceClaim, which will - be bound to this pod. When this pod is deleted, the ResourceClaim - will also be deleted. The pod name and resource name, along with a - generated component, will be used to form a unique name for the - ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + This requires all Pods that share the same volume to use the same SELinux label. + It is not possible to share the same volume among privileged and unprivileged Pods. + Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + CSIDriver instance. Other volumes are always re-labelled recursively. + "MountOption" value is allowed only when SELinuxMount feature gate is enabled. - When the DRAWorkloadResourceClaims feature gate is enabled and the pod - belongs to a PodGroup that defines a PodGroupResourceClaim with the same - Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the - ResourceClaim generated for the PodGroup. All pods in the group that - define an equivalent PodResourceClaim matching the - PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same - generated ResourceClaim. ResourceClaims generated for a PodGroup are - owned by the PodGroup and their lifecycles are tied to the PodGroup - instead of any individual pod. + If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + and "Recursive" for all other volumes. - This field is immutable and no changes will be made to the - corresponding ResourceClaim by the control plane after creating the - ResourceClaim. + This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. - Exactly one of ResourceClaimName and ResourceClaimTemplateName must - be set. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - resources: + All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + Note that this field cannot be set when spec.os.name is windows. + type: string + seLinuxOptions: description: |- - Resources is the total amount of CPU and Memory resources required by all - containers in the pod. It supports specifying Requests and Limits for - "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. - - This field enables fine-grained control over resource allocation for the - entire pod, allowing resource sharing among containers in a pod. - - This is an alpha field and requires enabling the PodLevelResources feature - gate. + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry - in PodSpec.ResourceClaims. - properties: - name: - 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. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + level: + description: Level is SELinux level label that + applies to the container. + type: string + role: + description: Role is a SELinux role label that + applies to the container. + type: string + type: + description: Type is a SELinux type label that + applies to the container. + type: string + user: + description: User is a SELinux user label that + applies to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: 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/ - type: object + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type type: object - restartPolicy: - description: |- - Restart policy for all containers within the pod. - One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. - Default to Always. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy - type: string - runtimeClassName: + supplementalGroups: description: |- - RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used - to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. - If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an - empty definition that uses the default runtime handler. - More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class - type: string - schedulerName: + A list of groups applied to the first process run in each container, in + addition to the container's primary GID and fsGroup (if specified). If + the SupplementalGroupsPolicy feature is enabled, the + supplementalGroupsPolicy field determines whether these are in addition + to or instead of any group memberships defined in the container image. + If unspecified, no additional groups are added, though group memberships + defined in the container image may still be used, depending on the + supplementalGroupsPolicy field. + Note that this field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: description: |- - If specified, the pod will be dispatched by specified scheduler. - If not specified, the pod will be dispatched by default scheduler. + Defines how supplemental groups of the first container processes are calculated. + Valid values are "Merge" and "Strict". If not specified, "Merge" is used. + (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled + and the container runtime must implement support for this feature. + Note that this field cannot be set when spec.os.name is windows. type: string - schedulingGates: + sysctls: description: |- - SchedulingGates is an opaque list of values that if specified will block scheduling the pod. - If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the - scheduler will not attempt to schedule the pod. - - SchedulingGates can only be set at pod creation time, and be removed only afterwards. + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. items: - description: PodSchedulingGate is associated to - a Pod to guard its scheduling. + description: Sysctl defines a kernel parameter to + be set properties: name: - description: |- - Name of the scheduling gate. - Each scheduling gate must have a unique name field. + description: Name of a property to set + type: string + value: + description: Value of a property to set type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - schedulingGroup: + x-kubernetes-list-type: atomic + windowsOptions: description: |- - SchedulingGroup provides a reference to the immediate scheduling runtime - grouping object that this Pod belongs to. - This field is used by the scheduler to identify the group and apply the - correct group scheduling policies. The association with a group also - impacts other lifecycle aspects of a Pod that are relevant in a wider context - of scheduling like preemption, resource attachment, etc. If not specified, - the Pod is treated as a single unit in all of these aspects. - The group object referenced by this field may not exist at the time the - Pod is created. - This field is immutable, but a group object with the same name may be - recreated with different policies. Doing this during pod scheduling - may result in the placement not conforming to the expected policies. + The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. properties: - podGroupName: + gmsaCredentialSpec: description: |- - PodGroupName specifies the name of the standalone PodGroup object - that represents the runtime instance of this group. - Must be a DNS subdomain. + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. type: string - type: object - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - Optional: Defaults to empty. See type description for default values of each field. - properties: - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - fsGroup: - description: |- - A special supplemental group that applies to all containers in a pod. - Some volume types allow the Kubelet to change the ownership of that volume - to be owned by the pod: - - 1. The owning GID will be the FSGroup - 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) - 3. The permission bits are OR'd with rw-rw---- - - If unset, the Kubelet will not modify the ownership and permissions of any volume. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - fsGroupChangePolicy: - description: |- - fsGroupChangePolicy defines behavior of changing ownership and permission of the volume - before being exposed inside Pod. This field will only apply to - volume types which support fsGroup based ownership(and permissions). - It will have no effect on ephemeral volume types such as: secret, configmaps - and emptydir. - Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. - Note that this field cannot be set when spec.os.name is windows. + gmsaCredentialSpecName: + description: GMSACredentialSpecName is the name + of the GMSA credential spec to use. type: string - runAsGroup: + hostProcess: description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence - for that container. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. + HostProcess determines if a container should be run as a 'Host 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. type: boolean - runAsUser: + runAsUserName: description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence - for that container. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxChangePolicy: - description: |- - seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. - It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. - Valid values are "MountOption" and "Recursive". - - "Recursive" means relabeling of all files on all Pod volumes by the container runtime. - This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. - - "MountOption" mounts all eligible Pod volumes with `-o context` mount option. - This requires all Pods that share the same volume to use the same SELinux label. - It is not possible to share the same volume among privileged and unprivileged Pods. - Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes - whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their - CSIDriver instance. Other volumes are always re-labelled recursively. - "MountOption" value is allowed only when SELinuxMount feature gate is enabled. - - If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. - If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes - and "Recursive" for all other volumes. - - This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. - - All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. - Note that this field cannot be set when spec.os.name is windows. + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. type: string - seLinuxOptions: - description: |- - The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in SecurityContext. If set in - both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux level label - that applies to the container. - type: string - role: - description: Role is a SELinux role label - that applies to the container. - type: string - type: - description: Type is a SELinux type label - that applies to the container. - type: string - user: - description: User is a SELinux user label - that applies to the container. - type: string - type: object - seccompProfile: - description: |- - The seccomp options to use by the containers in this pod. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: + type: object + type: object + serviceAccount: + description: |- + DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. + Deprecated: Use serviceAccountName instead. + type: string + serviceAccountName: + description: |- + ServiceAccountName is the name of the ServiceAccount to use to run this pod. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + type: string + setHostnameAsFQDN: + description: |- + If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + If a pod does not have FQDN, this has no effect. + Default to false. + type: boolean + shareProcessNamespace: + description: |- + Share a single process namespace between all of the containers in a pod. + When this is set containers will be able to view and signal processes from other containers + in the same pod, and the first process in each container will not be assigned PID 1. + HostPID and ShareProcessNamespace cannot both be set. + Optional: Default to false. + type: boolean + subdomain: + description: |- + If specified, the fully qualified Pod hostname will be "...svc.". + If not specified, the pod will not have a domainname at all. + type: string + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + If this value is nil, the default grace period will be used instead. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + Defaults to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + topologySpreadConstraints: + description: |- + TopologySpreadConstraints describes how a group of pods ought to spread across topology + domains. Scheduler will schedule pods in a way which abides by the constraints. + All topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint specifies how + to spread matching pods among the given topology. + properties: + labelSelector: + description: |- + LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine the number of pods + in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions is a list of label + selector requirements. The requirements are + ANDed. + items: description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that + the selector applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - required: - - type - type: object - supplementalGroups: - description: |- - A list of groups applied to the first process run in each container, in - addition to the container's primary GID and fsGroup (if specified). If - the SupplementalGroupsPolicy feature is enabled, the - supplementalGroupsPolicy field determines whether these are in addition - to or instead of any group memberships defined in the container image. - If unspecified, no additional groups are added, though group memberships - defined in the container image may still be used, depending on the - supplementalGroupsPolicy field. - Note that this field cannot be set when spec.os.name is windows. - items: - format: int64 - type: integer - type: array - x-kubernetes-list-type: atomic - supplementalGroupsPolicy: - description: |- - Defines how supplemental groups of the first container processes are calculated. - Valid values are "Merge" and "Strict". If not specified, "Merge" is used. - (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled - and the container runtime must implement support for this feature. - Note that this field cannot be set when spec.os.name is windows. - type: string - sysctls: - description: |- - Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported - sysctls (by the container runtime) might fail to launch. - Note that this field cannot be set when spec.os.name is windows. - items: - description: Sysctl defines a kernel parameter - to be set - properties: - name: - description: Name of a property to set - type: string - value: - description: Value of a property to set - type: string - required: - - name - - value + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: array - x-kubernetes-list-type: atomic - windowsOptions: - description: |- - The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName is the - name of the GMSA credential spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - serviceAccount: - description: |- - DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. - Deprecated: Use serviceAccountName instead. - type: string - serviceAccountName: - description: |- - ServiceAccountName is the name of the ServiceAccount to use to run this pod. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - type: string - setHostnameAsFQDN: - description: |- - If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). - In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). - In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. - If a pod does not have FQDN, this has no effect. - Default to false. - type: boolean - shareProcessNamespace: - description: |- - Share a single process namespace between all of the containers in a pod. - When this is set containers will be able to view and signal processes from other containers - in the same pod, and the first process in each container will not be assigned PID 1. - HostPID and ShareProcessNamespace cannot both be set. - Optional: Default to false. - type: boolean - subdomain: - description: |- - If specified, the fully qualified Pod hostname will be "...svc.". - If not specified, the pod will not have a domainname at all. - type: string - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - If this value is nil, the default grace period will be used instead. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - Defaults to 30 seconds. - format: int64 - type: integer - tolerations: - description: If specified, the pod's tolerations. - items: + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . + MatchLabelKeys is a set of pod label keys to select the pods over which + spreading will be calculated. The keys are used to lookup values from the + incoming pod labels, those key-value labels are ANDed with labelSelector + to select the group of existing pods over which spreading will be calculated + for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector isn't set. + Keys that don't exist in the incoming pod labels will + be ignored. A null or empty list means only match against labelSelector. + + This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: |- + MaxSkew describes the degree to which pods may be unevenly distributed. + When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + between the number of matching pods in the target topology and the global minimum. + The global minimum is the minimum number of matching pods in an eligible domain + or zero if the number of eligible domains is less than MinDomains. + For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + labelSelector spread as 2/2/1: + In this case, the global minimum is 1. + | zone1 | zone2 | zone3 | + | P P | P P | P | + - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; + scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + violate MaxSkew(1). + - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + to topologies that satisfy it. + It's a required field. Default value is 1 and 0 is not allowed. + format: int32 + type: integer + minDomains: + description: |- + MinDomains indicates a minimum number of eligible domains. + When the number of eligible domains with matching topology keys is less than minDomains, + Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. + And when the number of eligible domains with matching topology keys equals or greater than minDomains, + this value has no effect on scheduling. + As a result, when the number of eligible domains is less than minDomains, + scheduler won't schedule more than maxSkew Pods to those domains. + If value is nil, the constraint behaves as if MinDomains is equal to 1. + Valid values are integers greater than 0. + When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + + For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same + labelSelector spread as 2/2/2: + | zone1 | zone2 | zone3 | + | P P | P P | P P | + The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. + In this situation, new pod with the same labelSelector cannot be scheduled, + because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, + it will violate MaxSkew. + format: int32 + type: integer + nodeAffinityPolicy: + description: |- + NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector + when calculating pod topology spread skew. Options are: + - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. + - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + + If this value is nil, the behavior is equivalent to the Honor policy. + type: string + nodeTaintsPolicy: + description: |- + NodeTaintsPolicy indicates how we will treat node taints when calculating + pod topology spread skew. Options are: + - Honor: nodes without taints, along with tainted nodes for which the incoming pod + has a toleration, are included. + - Ignore: node taints are ignored. All nodes are included. + + If this value is nil, the behavior is equivalent to the Ignore policy. + type: string + topologyKey: + description: |- + TopologyKey is the key of node labels. Nodes that have a label with this key + and identical values are considered to be in the same topology. + We consider each as a "bucket", and try to put balanced number + of pods into each bucket. + We define a domain as a particular instance of a topology. + Also, we define an eligible domain as a domain whose nodes meet the requirements of + nodeAffinityPolicy and nodeTaintsPolicy. + e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. + And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. + It's a required field. + type: string + whenUnsatisfiable: + description: |- + WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + the spread constraint. + - DoNotSchedule (default) tells the scheduler not to schedule it. + - ScheduleAnyway tells the scheduler to schedule the pod in any location, + but giving higher precedence to topologies that would help reduce the + skew. + A constraint is considered "Unsatisfiable" for an incoming pod + if and only if every possible node assignment for that pod would violate + "MaxSkew" on some topology. + For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + labelSelector spread as 3/1/1: + | zone1 | zone2 | zone3 | + | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + won't make it *more* imbalanced. + It's a required field. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + description: |- + List of volumes that can be mounted by containers belonging to the pod. + More info: https://kubernetes.io/docs/concepts/storage/volumes + items: + description: Volume represents a named volume in a pod + that may be accessed by any container in the pod. + properties: + awsElasticBlockStore: + description: |- + awsElasticBlockStore represents an AWS Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore properties: - effect: + fsType: description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + 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 type: string - key: + partition: + description: |- + 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). + format: int32 + type: integer + readOnly: + description: |- + readOnly value true will force the readOnly setting in VolumeMounts. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + type: boolean + volumeID: description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. + volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + type: string + required: + - volumeID + type: object + azureDisk: + description: |- + azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + are redirected to the disk.csi.azure.com CSI driver. + properties: + cachingMode: + description: 'cachingMode is the Host Caching + mode: None, Read Only, Read Write.' + type: string + diskName: + description: diskName is the Name of the data + disk in the blob storage + type: string + diskURI: + description: diskURI is the URI of data disk + in the blob storage type: string - operator: + fsType: + default: ext4 description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + 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. type: string - tolerationSeconds: + kind: + description: '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' + type: string + readOnly: + default: false description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: + readOnly Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: |- + azureFile represents an Azure File Service mount on the host and bind mount to the pod. + Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + are redirected to the file.csi.azure.com CSI driver. + properties: + readOnly: description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name of secret + that contains Azure Storage Account Name and + Key type: string + shareName: + description: shareName is the azure share Name + type: string + required: + - secretName + - shareName type: object - type: array - x-kubernetes-list-type: atomic - topologySpreadConstraints: - description: |- - TopologySpreadConstraints describes how a group of pods ought to spread across topology - domains. Scheduler will schedule pods in a way which abides by the constraints. - All topologySpreadConstraints are ANDed. - items: - description: TopologySpreadConstraint specifies - how to spread matching pods among the given topology. + cephfs: + description: |- + cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. properties: - labelSelector: + monitors: description: |- - LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine the number of pods - in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions is a list - of label selector requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key - that the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select the pods over which - spreading will be calculated. The keys are used to lookup values from the - incoming pod labels, those key-value labels are ANDed with labelSelector - to select the group of existing pods over which spreading will be calculated - for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - MatchLabelKeys cannot be set when LabelSelector isn't set. - Keys that don't exist in the incoming pod labels will - be ignored. A null or empty list means only match against labelSelector. - - This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + monitors is Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it items: type: string type: array x-kubernetes-list-type: atomic - maxSkew: - description: |- - MaxSkew describes the degree to which pods may be unevenly distributed. - When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference - between the number of matching pods in the target topology and the global minimum. - The global minimum is the minimum number of matching pods in an eligible domain - or zero if the number of eligible domains is less than MinDomains. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 2/2/1: - In this case, the global minimum is 1. - | zone1 | zone2 | zone3 | - | P P | P P | P | - - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) - violate MaxSkew(1). - - if MaxSkew is 2, incoming pod can be scheduled onto any zone. - When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence - to topologies that satisfy it. - It's a required field. Default value is 1 and 0 is not allowed. - format: int32 - type: integer - minDomains: - description: |- - MinDomains indicates a minimum number of eligible domains. - When the number of eligible domains with matching topology keys is less than minDomains, - Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - And when the number of eligible domains with matching topology keys equals or greater than minDomains, - this value has no effect on scheduling. - As a result, when the number of eligible domains is less than minDomains, - scheduler won't schedule more than maxSkew Pods to those domains. - If value is nil, the constraint behaves as if MinDomains is equal to 1. - Valid values are integers greater than 0. - When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - - For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - labelSelector spread as 2/2/2: - | zone1 | zone2 | zone3 | - | P P | P P | P P | - The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - In this situation, new pod with the same labelSelector cannot be scheduled, - because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - it will violate MaxSkew. - format: int32 - type: integer - nodeAffinityPolicy: - description: |- - NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector - when calculating pod topology spread skew. Options are: - - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. - - If this value is nil, the behavior is equivalent to the Honor policy. + path: + description: 'path is Optional: Used as the + mounted root, rather than the full Ceph tree, + default is /' type: string - nodeTaintsPolicy: + readOnly: description: |- - NodeTaintsPolicy indicates how we will treat node taints when calculating - pod topology spread skew. Options are: - - Honor: nodes without taints, along with tainted nodes for which the incoming pod - has a toleration, are included. - - Ignore: node taints are ignored. All nodes are included. - - If this value is nil, the behavior is equivalent to the Ignore policy. - type: string - topologyKey: - description: |- - TopologyKey is the key of node labels. Nodes that have a label with this key - and identical values are considered to be in the same topology. - We consider each as a "bucket", and try to put balanced number - of pods into each bucket. - We define a domain as a particular instance of a topology. - Also, we define an eligible domain as a domain whose nodes meet the requirements of - nodeAffinityPolicy and nodeTaintsPolicy. - e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. - It's a required field. - type: string - whenUnsatisfiable: - description: |- - WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy - the spread constraint. - - DoNotSchedule (default) tells the scheduler not to schedule it. - - ScheduleAnyway tells the scheduler to schedule the pod in any location, - but giving higher precedence to topologies that would help reduce the - skew. - A constraint is considered "Unsatisfiable" for an incoming pod - if and only if every possible node assignment for that pod would violate - "MaxSkew" on some topology. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 3/1/1: - | zone1 | zone2 | zone3 | - | P P P | P | P | - If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled - to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies - MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler - won't make it *more* imbalanced. - It's a required field. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - - whenUnsatisfiable - x-kubernetes-list-type: map - volumes: - description: |- - List of volumes that can be mounted by containers belonging to the pod. - More info: https://kubernetes.io/docs/concepts/storage/volumes - items: - description: Volume represents a named volume in - a pod that may be accessed by any container in - the pod. - properties: - awsElasticBlockStore: + 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 + type: boolean + secretFile: description: |- - awsElasticBlockStore represents an AWS Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree - awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - properties: - fsType: - description: |- - 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 - type: string - partition: - description: |- - 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). - format: int32 - type: integer - readOnly: - description: |- - readOnly value true will force the readOnly setting in VolumeMounts. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: boolean - volumeID: - description: |- - volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: string - required: - - volumeID - type: object - azureDisk: + 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 + type: string + secretRef: description: |- - azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type - are redirected to the disk.csi.azure.com CSI driver. + 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 properties: - cachingMode: - description: 'cachingMode is the Host Caching - mode: None, Read Only, Read Write.' - type: string - diskName: - description: diskName is the Name of the - data disk in the blob storage - type: string - diskURI: - description: diskURI is the URI of data - disk in the blob storage - type: string - fsType: - default: ext4 + name: + default: "" description: |- - 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. - type: string - kind: - description: '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' + 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 type: string - readOnly: - default: false - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI type: object - azureFile: + x-kubernetes-map-type: atomic + user: description: |- - azureFile represents an Azure File Service mount on the host and bind mount to the pod. - Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type - are redirected to the file.csi.azure.com CSI driver. - properties: - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName is the name of - secret that contains Azure Storage Account - Name and Key - type: string - shareName: - description: shareName is the azure share - Name - type: string - required: - - secretName - - shareName - type: object - cephfs: + 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 + type: string + required: + - monitors + type: object + cinder: + description: |- + cinder represents a cinder volume attached and mounted on kubelets host machine. + Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + are redirected to the cinder.csi.openstack.org CSI driver. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + properties: + fsType: description: |- - cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. - Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. - properties: - monitors: - description: |- - monitors is Required: Monitors is a collection of Ceph monitors - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - path: - description: 'path is Optional: Used as - the mounted root, rather than the full - Ceph tree, default is /' - type: string - readOnly: - description: |- - 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 - type: boolean - secretFile: - description: |- - 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 - type: string - secretRef: - description: |- - 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 - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: |- - 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 - type: string - required: - - monitors - type: object - cinder: + 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 + type: string + readOnly: description: |- - cinder represents a cinder volume attached and mounted on kubelets host machine. - Deprecated: Cinder is deprecated. All operations for the in-tree cinder type - are redirected to the cinder.csi.openstack.org CSI driver. + 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 + type: boolean + secretRef: + description: |- + secretRef is optional: points to a secret object containing parameters used to connect + to OpenStack. properties: - fsType: - description: |- - 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 - type: string - readOnly: - description: |- - 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 - type: boolean - secretRef: - description: |- - secretRef is optional: points to a secret object containing parameters used to connect - to OpenStack. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: |- - volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents a configMap - that should populate this volume - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - items: - description: |- - 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 keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path - within a volume. - properties: - key: - description: key is the key to project. - type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic name: default: "" description: |- @@ -7044,1757 +6959,1783 @@ spec: almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: optional specify whether the - ConfigMap or its keys must be defined - type: boolean type: object x-kubernetes-map-type: atomic - csi: - description: csi (Container Storage Interface) - represents ephemeral storage that is handled - by certain external CSI drivers. - properties: - driver: - description: |- - 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. - type: string - fsType: - description: |- - 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. - type: string - nodePublishSecretRef: - description: |- - 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 object contains more than one secret, all secret references are passed. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: |- - readOnly specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: + volumeID: + description: |- + volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents a configMap that + should populate this volume + properties: + defaultMode: + description: |- + 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. + format: int32 + type: integer + items: + description: |- + 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 keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. type: string - description: |- - volumeAttributes stores driver-specific properties that are passed to the CSI - driver. Consult your driver's documentation for supported values. - type: object - required: - - driver - type: object - downwardAPI: - description: downwardAPI represents downward - API about the pod that should populate this - volume + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional specify whether the ConfigMap + or its keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage Interface) represents + ephemeral storage that is handled by certain external + CSI drivers. + properties: + driver: + description: |- + 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. + type: string + fsType: + description: |- + 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. + type: string + nodePublishSecretRef: + description: |- + 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 object contains more than one secret, all secret references are passed. properties: - defaultMode: + name: + default: "" description: |- - Optional: mode bits to use on created files by default. Must be a - 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. - format: int32 - type: integer - items: - description: Items is a list of downward - API volume file - items: - description: DownwardAPIVolumeFile represents - information to create the file containing - the pod field + 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 + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + description: |- + readOnly specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: |- + volumeAttributes stores driver-specific properties that are passed to the CSI + driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents downward API + about the pod that should populate this volume + properties: + defaultMode: + description: |- + Optional: mode bits to use on created files by default. Must be a + 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. + format: int32 + type: integer + items: + description: Items is a list of downward API + volume file + items: + description: DownwardAPIVolumeFile represents + information to create the file containing + the pod field + properties: + fieldRef: + description: 'Required: Selects a field + of the pod: only annotations, labels, + name, namespace and uid are supported.' properties: - fieldRef: - description: 'Required: Selects a - field of the pod: only annotations, - labels, name, namespace and uid - are supported.' - properties: - apiVersion: - description: Version of the schema - the FieldPath is written in - terms of, defaults to "v1". - type: string - fieldPath: - description: Path of the field - to select in the specified API - version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - 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 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 be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: Path is the - relative path name of the file to - be created. Must not be absolute - or contain the ''..'' path. Must - be utf-8 encoded. The first item - of the relative path must not start - with ''..''' + apiVersion: + description: Version of the schema + the FieldPath is written in terms + of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to + select in the specified API version. type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container name: - required for volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output - format of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource - to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic required: - - path + - fieldPath type: object - type: array - x-kubernetes-list-type: atomic - type: object - emptyDir: + x-kubernetes-map-type: atomic + mode: + 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 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 be other mode bits set. + format: int32 + type: integer + path: + description: 'Required: Path is the relative + path name of the file to be created. + Must not be absolute or contain the + ''..'' path. Must be utf-8 encoded. + The first item of the relative path + must not start with ''..''' + type: string + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + properties: + containerName: + description: 'Container name: required + for volumes, optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output + format of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to + select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + description: |- + emptyDir represents a temporary directory that shares a pod's lifetime. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + properties: + medium: description: |- - emptyDir represents a temporary directory that shares a pod's lifetime. + 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 - properties: - medium: - description: |- - 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 - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - 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 - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string description: |- - ephemeral represents a volume that is handled by a cluster storage driver. - The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, - and deleted when the pod is removed. + 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 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: |- + ephemeral represents a volume that is handled by a cluster storage driver. + The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + and deleted when the pod is removed. - Use this if: - a) the volume is only needed while the pod runs, - b) features of normal volumes like restoring from snapshot or capacity - tracking are needed, - c) the storage driver is specified through a storage class, and - d) the storage driver supports dynamic volume provisioning through - a PersistentVolumeClaim (see EphemeralVolumeSource for more - information on the connection between this volume type - and PersistentVolumeClaim). + Use this if: + a) the volume is only needed while the pod runs, + b) features of normal volumes like restoring from snapshot or capacity + tracking are needed, + c) the storage driver is specified through a storage class, and + d) the storage driver supports dynamic volume provisioning through + a PersistentVolumeClaim (see EphemeralVolumeSource for more + information on the connection between this volume type + and PersistentVolumeClaim). - Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. + Use PersistentVolumeClaim or one of the vendor-specific + APIs for volumes that persist for longer than the lifecycle + of an individual pod. - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to - be used that way - see the documentation of the driver for - more information. + Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + be used that way - see the documentation of the driver for + more information. - A pod can use both types of ephemeral volumes and - persistent volumes at the same time. - properties: - volumeClaimTemplate: - description: |- - Will be used to create a stand-alone PVC to provision the volume. - The pod in which this EphemeralVolumeSource is embedded will be the - owner of the PVC, i.e. the PVC will be deleted together with the - pod. The name of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` array - entry. Pod validation will reject the pod if the concatenated name - is not valid for a PVC (for example, too long). + A pod can use both types of ephemeral volumes and + persistent volumes at the same time. + properties: + volumeClaimTemplate: + description: |- + Will be used to create a stand-alone PVC to provision the volume. + The pod in which this EphemeralVolumeSource is embedded will be the + owner of the PVC, i.e. the PVC will be deleted together with the + pod. The name of the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` array + entry. Pod validation will reject the pod if the concatenated name + is not valid for a PVC (for example, too long). - An existing PVC with that name that is not owned by the pod - will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC is - meant to be used by the pod, the PVC has to updated with an - owner reference to the pod once the pod exists. Normally - this should not be necessary, but it may be useful when - manually reconstructing a broken cluster. + An existing PVC with that name that is not owned by the pod + will *not* be used for the pod to avoid using an unrelated + volume by mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created PVC is + meant to be used by the pod, the PVC has to updated with an + owner reference to the pod once the pod exists. Normally + this should not be necessary, but it may be useful when + manually reconstructing a broken cluster. - This field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. + This field is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. - Required, must not be nil. + Required, must not be nil. + properties: + metadata: + description: |- + May contain labels and annotations that will be copied into the PVC + when creating it. No other fields are allowed and will be rejected during + validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: |- + The specification for the PersistentVolumeClaim. The entire content is + copied unchanged into the PVC that gets created from this + template. The same fields as in a PersistentVolumeClaim + are also valid here. properties: - metadata: + accessModes: + description: |- + accessModes contains the desired access modes the volume should have. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: description: |- - May contain labels and annotations that will be copied into the PVC - when creating it. No other fields are allowed and will be rejected during - validation. + 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. + properties: + 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. + type: string + kind: + description: Kind is the type of + resource being referenced + type: string + name: + description: Name is the name of + resource being referenced + type: string + required: + - kind + - name type: object - spec: + x-kubernetes-map-type: atomic + dataSourceRef: description: |- - The specification for the PersistentVolumeClaim. The entire content is - copied unchanged into the PVC that gets created from this - template. The same fields as in a PersistentVolumeClaim - are also valid here. + 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. + 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 + allows any non-core object, as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values (dropping them), dataSourceRef + preserves all values, and generates an error if a disallowed value is + specified. + * While dataSource only allows local objects, dataSourceRef allows objects + in any namespaces. + (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. properties: - accessModes: + apiGroup: description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: + 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. + type: string + kind: + description: Kind is the type of + resource being referenced + type: string + name: + description: Name is the name of + resource being referenced + type: string + namespace: description: |- - 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. - properties: - 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. - type: string - kind: - description: Kind is the type - of resource being referenced - type: string - name: - description: Name is the name - of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: + 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. + type: string + required: + - kind + - name + type: object + resources: + description: |- + resources represents the minimum resources the volume should have. + 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 the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - 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. - 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 - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (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. - properties: - 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. - type: string - kind: - description: Kind is the type - of resource being referenced - type: string - name: - description: Name is the name - of resource being referenced - type: string - namespace: - 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. - type: string - required: - - kind - - name + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - resources: + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - resources represents the minimum resources the volume should have. - 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 the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - 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/ - type: object + 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/ type: object - selector: - description: selector is a label - query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: + type: object + selector: + description: selector is a label query + over volumes to consider for binding. + properties: + matchExpressions: + description: matchExpressions is + a list of label selector requirements. + The requirements are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label + key that the selector applies + to. + type: string + operator: description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the - label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - 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 or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - 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/ - type: string - volumeMode: + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding - reference to the PersistentVolume - backing this claim. - type: string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a Fibre Channel resource - that is attached to a kubelet's host machine - and then exposed to the pod. - properties: - fsType: - description: |- - 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. - type: string - lun: - description: 'lun is Optional: FC target - lun number' - format: int32 - type: integer - readOnly: - description: |- - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - targetWWNs: - description: 'targetWWNs is Optional: FC - target worldwide names (WWNs)' - items: - type: string - type: array - x-kubernetes-list-type: atomic - wwids: - description: |- - wwids Optional: FC volume world wide identifiers (wwids) - Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - flexVolume: - description: |- - flexVolume represents a generic volume resource that is - provisioned/attached using an exec based plugin. - Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. - properties: - driver: - description: driver is the name of the driver - to use for this volume. - type: string - fsType: - description: |- - 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. - type: string - options: - additionalProperties: - type: string - description: 'options is Optional: this - field holds extra command options if any.' - type: object - readOnly: - description: |- - readOnly is Optional: defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - 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. - properties: - name: - default: "" + x-kubernetes-map-type: atomic + storageClassName: description: |- - 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 + storageClassName is the name of the StorageClass required by the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + type: string + 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 or nil value indicates that no + VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, + this field can be reset to its previous value (including nil) to cancel the modification. + 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/ + type: string + volumeMode: + description: |- + volumeMode defines what type of volume is required by the claim. + Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: volumeName is the binding + reference to the PersistentVolume + backing this claim. type: string type: object - x-kubernetes-map-type: atomic required: - - driver + - spec type: object - flocker: + type: object + fc: + description: fc represents a Fibre Channel resource + that is attached to a kubelet's host machine and + then exposed to the pod. + properties: + fsType: description: |- - flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. - Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. - properties: - datasetName: - description: |- - datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker - should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID is the UUID of - the dataset. This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: + 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. + type: string + lun: + description: 'lun is Optional: FC target lun + number' + format: int32 + type: integer + readOnly: description: |- - gcePersistentDisk represents a GCE Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree - gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - properties: - fsType: - description: |- - 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 - type: string - partition: - description: |- - 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 - format: int32 - type: integer - pdName: - description: |- - 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 - type: string - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: boolean - required: - - pdName - type: object - gitRepo: + readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + targetWWNs: + description: 'targetWWNs is Optional: FC target + worldwide names (WWNs)' + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: description: |- - 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. - properties: - directory: - description: |- - 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. - type: string - repository: - description: repository is the URL - type: string - revision: - description: revision is the commit hash - for the specified revision. - type: string - required: - - repository + wwids Optional: FC volume world wide identifiers (wwids) + Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + description: |- + flexVolume represents a generic volume resource that is + provisioned/attached using an exec based plugin. + Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + properties: + driver: + description: driver is the name of the driver + to use for this volume. + type: string + fsType: + description: |- + 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. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: this field + holds extra command options if any.' type: object - glusterfs: + readOnly: + description: |- + readOnly is Optional: defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: description: |- - glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. - Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + 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. properties: - endpoints: - description: endpoints is the endpoint name - that details Glusterfs topology. - type: string - path: + name: + default: "" description: |- - path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + 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 type: string - readOnly: - description: |- - 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 - type: boolean - required: - - endpoints - - path type: object - hostPath: + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: |- + flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + properties: + datasetName: + description: |- + datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + should be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is the UUID of the + dataset. This is unique identifier of a Flocker + dataset + type: string + type: object + gcePersistentDisk: + description: |- + gcePersistentDisk represents a GCE Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + properties: + fsType: + description: |- + 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 + type: string + partition: + description: |- + 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 + format: int32 + type: integer + pdName: + description: |- + 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 + type: string + readOnly: + description: |- + readOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + type: boolean + required: + - pdName + type: object + gitRepo: + description: |- + 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. + properties: + directory: + description: |- + 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. + type: string + repository: + description: repository is the URL + type: string + revision: + description: revision is the commit hash for + the specified revision. + type: string + required: + - repository + type: object + glusterfs: + description: |- + glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + properties: + endpoints: + description: endpoints is the endpoint name + that details Glusterfs topology. + type: string + path: + description: |- + path is the Glusterfs volume path. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + type: string + readOnly: description: |- - 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. + 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 + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: |- + 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: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + properties: + path: + description: |- + 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 - properties: - path: - description: |- - 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 - type: string - type: - description: |- - type for HostPath Volume - Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - type: string - required: - - path - type: object - image: + type: string + type: description: |- - image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. - The volume is resolved at pod startup depending on which PullPolicy value is provided: + type for HostPath Volume + Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + type: string + required: + - path + type: object + image: + description: |- + image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. + The volume is resolved at pod startup depending on which PullPolicy value is provided: - - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. - A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. - The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. - The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. - The volume will be mounted read-only (ro). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. - The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. - properties: - pullPolicy: - description: |- - Policy for pulling OCI objects. Possible values are: - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. - type: string - reference: - description: |- - Required: Image or artifact reference to be used. - Behaves in the same way as pod.spec.containers[*].image. - Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. - 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 and StatefulSets. - type: string - type: object - iscsi: + The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. + A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. + The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. + The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. + The volume will be mounted read-only (ro). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. + The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. + properties: + pullPolicy: + description: |- + Policy for pulling OCI objects. Possible values are: + Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + type: string + reference: + description: |- + Required: Image or artifact reference to be used. + Behaves in the same way as pod.spec.containers[*].image. + Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. + 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 and StatefulSets. + type: string + type: object + iscsi: + description: |- + iscsi represents an ISCSI 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/#iscsi + properties: + chapAuthDiscovery: + description: chapAuthDiscovery defines whether + support iSCSI Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession defines whether + support iSCSI Session CHAP authentication + type: boolean + fsType: + description: |- + 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 + type: string + initiatorName: + description: |- + initiatorName is the custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + : will be created for the connection. + type: string + iqn: + description: iqn is the target iSCSI Qualified + Name. + type: string + iscsiInterface: + default: default + description: |- + iscsiInterface is the interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: lun represents iSCSI Target Lun + number. + format: int32 + type: integer + portals: + description: |- + 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). + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: description: |- - iscsi represents an ISCSI 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/#iscsi + readOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + type: boolean + secretRef: + description: secretRef is the CHAP Secret for + iSCSI target and initiator authentication properties: - chapAuthDiscovery: - description: chapAuthDiscovery defines whether - support iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession defines whether - support iSCSI Session CHAP authentication - type: boolean - fsType: - description: |- - 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 - type: string - initiatorName: - description: |- - initiatorName is the custom iSCSI Initiator Name. - If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - : will be created for the connection. - type: string - iqn: - description: iqn is the target iSCSI Qualified - Name. - type: string - iscsiInterface: - default: default - description: |- - iscsiInterface is the interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: lun represents iSCSI Target - Lun number. - format: int32 - type: integer - portals: - description: |- - 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). - items: - type: string - type: array - x-kubernetes-list-type: atomic - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - type: boolean - secretRef: - description: secretRef is the CHAP Secret - for iSCSI target and initiator authentication - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: + name: + default: "" description: |- - 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). + 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 type: string - required: - - iqn - - lun - - targetPortal type: object - name: + x-kubernetes-map-type: atomic + targetPortal: description: |- - 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 + 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). type: string - nfs: + required: + - iqn + - lun + - targetPortal + type: object + name: + description: |- + 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 + type: string + nfs: + description: |- + nfs represents an NFS mount on the host that shares a pod's lifetime + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + properties: + path: description: |- - nfs represents an NFS mount on the host that shares a pod's lifetime + path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - properties: - path: - description: |- - path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - readOnly: - description: |- - 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 - type: boolean - server: - description: |- - server is the hostname or IP address of the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - required: - - path - - server - type: object - persistentVolumeClaim: + type: string + readOnly: + description: |- + 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 + type: boolean + server: description: |- - persistentVolumeClaimVolumeSource represents a reference to a - PersistentVolumeClaim in the same namespace. + server is the hostname or IP address of the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: |- + persistentVolumeClaimVolumeSource represents a reference to a + PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + properties: + claimName: + description: |- + 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 - properties: - claimName: - description: |- - 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 - type: string - readOnly: - description: |- - readOnly Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: + type: string + readOnly: description: |- - photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. - Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. - properties: - fsType: - description: |- - 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. - type: string - pdID: - description: pdID is the ID that identifies - Photon Controller persistent disk - type: string - required: - - pdID - type: object - portworxVolume: + readOnly Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: |- + photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. + properties: + fsType: + description: |- + 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. + type: string + pdID: + description: pdID is the ID that identifies + Photon Controller persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: |- + portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + are redirected to the pxd.portworx.com CSI driver. + properties: + fsType: + description: |- + 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. + type: string + readOnly: + description: |- + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely identifies a + Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for all in one resources + secrets, configmaps, and downward API + properties: + defaultMode: description: |- - portworxVolume represents a portworx volume attached and mounted on kubelets host machine. - Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type - are redirected to the pxd.portworx.com CSI driver. - properties: - fsType: - description: |- - 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. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely identifies - a Portworx volume - type: string - required: - - volumeID - type: object - projected: - description: projected items for all in one - resources secrets, configmaps, and downward - API - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - sources: - description: |- - sources is the list of volume projections. Each entry in this list - handles one source. - items: + 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. + format: int32 + type: integer + sources: + description: |- + sources is the list of volume projections. Each entry in this list + handles one source. + items: + description: |- + Projection that may be projected along with other supported volume types. + Exactly one of these fields must be set. + properties: + clusterTrustBundle: description: |- - Projection that may be projected along with other supported volume types. - Exactly one of these fields must be set. - properties: - clusterTrustBundle: - description: |- - ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field - of ClusterTrustBundle objects in an auto-updating file. + ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field + of ClusterTrustBundle objects in an auto-updating file. - Alpha, gated by the ClusterTrustBundleProjection feature gate. + Alpha, gated by the ClusterTrustBundleProjection feature gate. - ClusterTrustBundle objects can either be selected by name, or by the - combination of signer name and a label selector. + ClusterTrustBundle objects can either be selected by name, or by the + combination of signer name and a label selector. - Kubelet 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. - properties: - labelSelector: - description: |- - 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". - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is - the label key that - the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: |- - Select a single ClusterTrustBundle by object name. Mutually-exclusive - with signerName and labelSelector. - type: string - optional: - description: |- - 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. - type: boolean - path: - description: Relative path from - the volume root to write the - bundle. - type: string - signerName: - description: |- - Select all ClusterTrustBundles that match this signer name. - Mutually-exclusive with name. The contents of all selected - ClusterTrustBundles will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap information - about the configMap data to project + Kubelet 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. + properties: + labelSelector: + description: |- + 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". properties: - items: - description: |- - 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 keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. items: - description: Maps a string key - to a path within a volume. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is the - key to project. - type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. + label key that the selector + applies to. type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - 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 - type: string - optional: - description: optional specify - whether the ConfigMap or its - keys must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI information - about the downwardAPI data to project - properties: - items: - description: Items is a list of - DownwardAPIVolume file - items: - description: DownwardAPIVolumeFile - represents information to - create the file containing - the pod field - properties: - fieldRef: - description: 'Required: - Selects a field of the - pod: only annotations, - labels, name, namespace - and uid are supported.' - properties: - apiVersion: - description: Version - of the schema the - FieldPath is written - in terms of, defaults - to "v1". - type: string - fieldPath: - description: Path of - the field to select - in the specified API - version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: + operator: 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 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 be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: - Path is the relative - path name of the file - to be created. Must not - be absolute or contain - the ''..'' path. Must - be utf-8 encoded. The - first item of the relative - path must not start with - ''..''' + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - resourceFieldRef: + values: description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container - name: required for - volumes, optional - for env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format - of the exposed resources, - defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - - path + - key + - operator type: object type: array x-kubernetes-list-type: atomic - type: object - podCertificate: - description: |- - Projects an auto-rotating credential bundle (private key and certificate - chain) that the pod can use either as a TLS client or server. - - Kubelet generates a private key and uses it to send a - PodCertificateRequest to the named signer. Once the signer approves the - request and issues a certificate chain, Kubelet writes the key and - certificate chain to the pod filesystem. The pod does not start until - certificates have been issued for each podCertificate projected volume - source in its spec. - - Kubelet will begin trying to rotate the certificate at the time indicated - by the signer using the PodCertificateRequest.Status.BeginRefreshAt - timestamp. - - Kubelet can write a single file, indicated by the credentialBundlePath - field, or separate files, indicated by the keyPath and - certificateChainPath fields. - - The credential bundle is a single file in PEM format. The first PEM - entry is the private key (in PKCS#8 format), and the remaining PEM - entries are the certificate chain issued by the signer (typically, - signers will return their certificate chain in leaf-to-root order). - - Prefer using the credential bundle format, since your application code - can read it atomically. If you use keyPath and certificateChainPath, - your application must make two separate file reads. If these coincide - with a certificate rotation, it is possible that the private key and leaf - certificate you read may not correspond to each other. Your application - will need to check for this condition, and re-read until they are - consistent. - - The named signer controls chooses the format of the certificate it - issues; consult the signer implementation's documentation to learn how to - use the certificates it issues. - properties: - certificateChainPath: - description: |- - Write the certificate chain at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - credentialBundlePath: - description: |- - Write the credential bundle at this path in the projected volume. - - The credential bundle is a single file that contains multiple PEM blocks. - The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private - key. - - The remaining blocks are CERTIFICATE blocks, containing the issued - certificate chain from the signer (leaf and any intermediates). - - Using credentialBundlePath lets your Pod's application code make a single - atomic read that retrieves a consistent key and certificate chain. If you - project them to separate files, your application code will need to - additionally check that the leaf certificate was issued to the key. - type: string - keyPath: - description: |- - Write the key at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - keyType: - description: |- - The type of keypair Kubelet will generate for the pod. - - Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", - "ECDSAP521", and "ED25519". - type: string - maxExpirationSeconds: - description: |- - maxExpirationSeconds is the maximum lifetime permitted for the - certificate. - - Kubelet copies this value verbatim into the PodCertificateRequests it - generates for this projection. - - If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver - will reject values shorter than 3600 (1 hour). The maximum allowable - value is 7862400 (91 days). - - The signer implementation is then free to issue a certificate with any - lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 - seconds (1 hour). This constraint is enforced by kube-apiserver. - `kubernetes.io` signers will never issue certificates with a lifetime - longer than 24 hours. - format: int32 - type: integer - signerName: - description: Kubelet's generated - CSRs will be addressed to this - signer. - type: string - userAnnotations: + matchLabels: additionalProperties: type: string description: |- - userAnnotations allow pod authors to pass additional information to - the signer implementation. Kubernetes does not restrict or validate this - metadata in any way. - - These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of - the PodCertificateRequest objects that Kubelet creates. - - Entries are subject to the same validation as object metadata annotations, - with the addition that all keys must be domain-prefixed. No restrictions - are placed on values, except an overall size limitation on the entire field. - - Signers should document the keys and values they support. Signers should - deny requests that contain keys they do not recognize. + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - required: - - keyType - - signerName type: object - secret: - description: secret information about - the secret data to project - properties: - items: - description: |- - 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 will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key - to a path within a volume. + x-kubernetes-map-type: atomic + name: + description: |- + Select a single ClusterTrustBundle by object name. Mutually-exclusive + with signerName and labelSelector. + type: string + optional: + description: |- + 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. + type: boolean + path: + description: Relative path from the + volume root to write the bundle. + type: string + signerName: + description: |- + Select all ClusterTrustBundles that match this signer name. + Mutually-exclusive with name. The contents of all selected + ClusterTrustBundles will be unified and deduplicated. + type: string + required: + - path + type: object + configMap: + description: configMap information about + the configMap data to project + properties: + items: + description: |- + 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 keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to + a path within a volume. + properties: + key: + description: key is the key + to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional specify whether + the ConfigMap or its keys must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI information about + the downwardAPI data to project + properties: + items: + description: Items is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile + represents information to create + the file containing the pod field + properties: + fieldRef: + description: 'Required: Selects + a field of the pod: only annotations, + labels, name, namespace and + uid are supported.' properties: - key: - description: key is the - key to project. + apiVersion: + description: Version of + the schema the FieldPath + is written in terms of, + defaults to "v1". type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. + fieldPath: + description: Path of the + field to select in the + specified API version. type: string required: - - key - - path + - fieldPath type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - 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 - type: string - optional: - description: optional field specify - whether the Secret or its key - must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken is - information about the serviceAccountToken - data to project - properties: - audience: - description: |- - 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. - type: string - expirationSeconds: - description: |- - 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 percent of - its time to live or if the token is older than 24 hours.Defaults to 1 hour - and must be at least 10 minutes. - format: int64 - type: integer - path: - description: |- - path is the path relative to the mount point of the file to project the - token into. - type: string - required: - - path - type: object - type: object - type: array - x-kubernetes-list-type: atomic - type: object - quobyte: - description: |- - quobyte represents a Quobyte mount on the host that shares a pod's lifetime. - Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. - properties: - group: - description: |- - group to map volume access to - Default is no group - type: string - readOnly: - description: |- - readOnly here will force the Quobyte volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: |- - 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 - type: string - tenant: - description: |- - tenant owning the given Quobyte volume in the Backend - Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: |- - user to map volume access to - Defaults to serivceaccount user - type: string - volume: - description: volume is a string that references - an already created Quobyte volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: |- - rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. - Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. - properties: - fsType: - description: |- - 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 - type: string - image: - description: |- - image is the rados image name. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - keyring: - default: /etc/ceph/keyring - description: |- - 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 - type: string - monitors: - description: |- - monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - pool: - default: rbd - description: |- - pool is the rados pool name. - Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - readOnly: - description: |- - 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 - type: boolean - secretRef: - description: |- - 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 - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - user: - default: admin - description: |- - user is the rados user name. - Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - required: - - image - - monitors - type: object - scaleIO: - description: |- - scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. - properties: - fsType: - default: xfs - description: |- - 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". - type: string - gateway: - description: gateway is the host address - of the ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain is the name - of the ScaleIO Protection Domain for the - configured storage. - type: string - readOnly: - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef references to the secret for ScaleIO user and other - sensitive information. If this is not provided, Login operation will fail. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled Flag enable/disable - SSL communication with Gateway, default - false - type: boolean - storageMode: - default: ThinProvisioned - description: |- - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool is the ScaleIO - Storage Pool associated with the protection - domain. - type: string - system: - description: system is the name of the storage - system as configured in ScaleIO. - type: string - volumeName: - description: |- - volumeName is the name of a volume already created in the ScaleIO system - that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: |- - secret represents a secret that should populate this volume. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - items: - description: |- - 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 will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string key to a path - within a volume. + x-kubernetes-map-type: atomic + mode: + 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 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 be other mode bits set. + format: int32 + type: integer + path: + description: 'Required: Path + is the relative path name + of the file to be created. + Must not be absolute or contain + the ''..'' path. Must be utf-8 + encoded. The first item of + the relative path must not + start with ''..''' + type: string + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + properties: + containerName: + description: 'Container + name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the + output format of the exposed + resources, defaults to + "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + description: |- + Projects an auto-rotating credential bundle (private key and certificate + chain) that the pod can use either as a TLS client or server. + + Kubelet generates a private key and uses it to send a + PodCertificateRequest to the named signer. Once the signer approves the + request and issues a certificate chain, Kubelet writes the key and + certificate chain to the pod filesystem. The pod does not start until + certificates have been issued for each podCertificate projected volume + source in its spec. + + Kubelet will begin trying to rotate the certificate at the time indicated + by the signer using the PodCertificateRequest.Status.BeginRefreshAt + timestamp. + + Kubelet can write a single file, indicated by the credentialBundlePath + field, or separate files, indicated by the keyPath and + certificateChainPath fields. + + The credential bundle is a single file in PEM format. The first PEM + entry is the private key (in PKCS#8 format), and the remaining PEM + entries are the certificate chain issued by the signer (typically, + signers will return their certificate chain in leaf-to-root order). + + Prefer using the credential bundle format, since your application code + can read it atomically. If you use keyPath and certificateChainPath, + your application must make two separate file reads. If these coincide + with a certificate rotation, it is possible that the private key and leaf + certificate you read may not correspond to each other. Your application + will need to check for this condition, and re-read until they are + consistent. + + The named signer controls chooses the format of the certificate it + issues; consult the signer implementation's documentation to learn how to + use the certificates it issues. properties: - key: - description: key is the key to project. + certificateChainPath: + description: |- + Write the certificate chain at this path in the projected volume. + + Most applications should use credentialBundlePath. When using keyPath + and certificateChainPath, your application needs to check that the key + and leaf certificate are consistent, because it is possible to read the + files mid-rotation. + type: string + credentialBundlePath: + description: |- + Write the credential bundle at this path in the projected volume. + + The credential bundle is a single file that contains multiple PEM blocks. + The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private + key. + + The remaining blocks are CERTIFICATE blocks, containing the issued + certificate chain from the signer (leaf and any intermediates). + + Using credentialBundlePath lets your Pod's application code make a single + atomic read that retrieves a consistent key and certificate chain. If you + project them to separate files, your application code will need to + additionally check that the leaf certificate was issued to the key. + type: string + keyPath: + description: |- + Write the key at this path in the projected volume. + + Most applications should use credentialBundlePath. When using keyPath + and certificateChainPath, your application needs to check that the key + and leaf certificate are consistent, because it is possible to read the + files mid-rotation. + type: string + keyType: + description: |- + The type of keypair Kubelet will generate for the pod. + + Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", + "ECDSAP521", and "ED25519". type: string - mode: + maxExpirationSeconds: description: |- - 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 be other mode bits set. + maxExpirationSeconds is the maximum lifetime permitted for the + certificate. + + Kubelet copies this value verbatim into the PodCertificateRequests it + generates for this projection. + + If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + will reject values shorter than 3600 (1 hour). The maximum allowable + value is 7862400 (91 days). + + The signer implementation is then free to issue a certificate with any + lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 + seconds (1 hour). This constraint is enforced by kube-apiserver. + `kubernetes.io` signers will never issue certificates with a lifetime + longer than 24 hours. format: int32 type: integer + signerName: + description: Kubelet's generated CSRs + will be addressed to this signer. + type: string + userAnnotations: + additionalProperties: + type: string + description: |- + userAnnotations allow pod authors to pass additional information to + the signer implementation. Kubernetes does not restrict or validate this + metadata in any way. + + These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of + the PodCertificateRequest objects that Kubelet creates. + + Entries are subject to the same validation as object metadata annotations, + with the addition that all keys must be domain-prefixed. No restrictions + are placed on values, except an overall size limitation on the entire field. + + Signers should document the keys and values they support. Signers should + deny requests that contain keys they do not recognize. + type: object + required: + - keyType + - signerName + type: object + secret: + description: secret information about + the secret data to project + properties: + items: + description: |- + 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 will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to + a path within a volume. + properties: + key: + description: key is the key + to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional field specify + whether the Secret or its key must + be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken is information + about the serviceAccountToken data to + project + properties: + audience: + description: |- + 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. + type: string + expirationSeconds: + description: |- + 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 percent of + its time to live or if the token is older than 24 hours.Defaults to 1 hour + and must be at least 10 minutes. + format: int64 + type: integer path: description: |- - 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 '..'. + path is the path relative to the mount point of the file to project the + token into. type: string required: - - key - path type: object - type: array - x-kubernetes-list-type: atomic - optional: - description: optional field specify whether - the Secret or its keys must be defined - type: boolean - secretName: + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + description: |- + quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + properties: + group: + description: |- + group to map volume access to + Default is no group + type: string + readOnly: + description: |- + readOnly here will force the Quobyte volume to be mounted with read-only permissions. + Defaults to false. + type: boolean + registry: + description: |- + 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 + type: string + tenant: + description: |- + tenant owning the given Quobyte volume in the Backend + Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: |- + user to map volume access to + Defaults to serivceaccount user + type: string + volume: + description: volume is a string that references + an already created Quobyte volume by name. + type: string + required: + - registry + - volume + type: object + rbd: + description: |- + rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + properties: + fsType: + description: |- + 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 + type: string + image: + description: |- + image is the rados image name. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + keyring: + default: /etc/ceph/keyring + description: |- + 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 + type: string + monitors: + description: |- + monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + description: |- + pool is the rados pool name. + Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + readOnly: + description: |- + 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 + type: boolean + secretRef: + description: |- + 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 + properties: + name: + default: "" description: |- - secretName is the name of the secret in the pod's namespace to use. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + 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 type: string type: object - storageos: + x-kubernetes-map-type: atomic + user: + default: admin + description: |- + user is the rados user name. + Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + required: + - image + - monitors + type: object + scaleIO: + description: |- + scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + properties: + fsType: + default: xfs + description: |- + 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". + type: string + gateway: + description: gateway is the host address of + the ScaleIO API Gateway. + type: string + protectionDomain: + description: protectionDomain is the name of + the ScaleIO Protection Domain for the configured + storage. + type: string + readOnly: + description: |- + readOnly Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: description: |- - storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + secretRef references to the secret for ScaleIO user and other + sensitive information. If this is not provided, Login operation will fail. properties: - fsType: - description: |- - 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. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef specifies the secret to use for obtaining the StorageOS API - credentials. If not specified, default values will be attempted. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: |- - volumeName is the human-readable name of the StorageOS volume. Volume - names are only unique within a namespace. - type: string - volumeNamespace: + name: + default: "" description: |- - 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 override the default behaviour. - Set to "default" if you are not using namespaces within StorageOS. - Namespaces that do not pre-exist within StorageOS will be created. + 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 type: string type: object - vsphereVolume: + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag enable/disable + SSL communication with Gateway, default false + type: boolean + storageMode: + default: ThinProvisioned + description: |- + storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is the ScaleIO Storage + Pool associated with the protection domain. + type: string + system: + description: system is the name of the storage + system as configured in ScaleIO. + type: string + volumeName: + description: |- + volumeName is the name of a volume already created in the ScaleIO system + that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: |- + secret represents a secret that should populate this volume. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + properties: + defaultMode: + description: |- + 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. + format: int32 + type: integer + items: + description: |- + 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 will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string key to a path within + a volume. + properties: + key: + description: key is the key to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + description: optional field specify whether + the Secret or its keys must be defined + type: boolean + secretName: + description: |- + secretName is the name of the secret in the pod's namespace to use. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + type: string + type: object + storageos: + description: |- + storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + properties: + fsType: + description: |- + 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. + type: string + readOnly: + description: |- + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: description: |- - vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. - Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type - are redirected to the csi.vsphere.vmware.com CSI driver. + secretRef specifies the secret to use for obtaining the StorageOS API + credentials. If not specified, default values will be attempted. properties: - fsType: + name: + default: "" description: |- - 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. - type: string - storagePolicyID: - description: storagePolicyID is the storage - Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName is the storage - Policy Based Management (SPBM) profile - name. - type: string - volumePath: - description: volumePath is the path that - identifies vSphere volume vmdk + 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 type: string - required: - - volumePath type: object + x-kubernetes-map-type: atomic + volumeName: + description: |- + volumeName is the human-readable name of the StorageOS volume. Volume + names are only unique within a namespace. + type: string + volumeNamespace: + description: |- + 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 override the default behaviour. + Set to "default" if you are not using namespaces within StorageOS. + Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: |- + vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + are redirected to the csi.vsphere.vmware.com CSI driver. + properties: + fsType: + description: |- + 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. + type: string + storagePolicyID: + description: storagePolicyID is the storage + Policy Based Management (SPBM) profile ID + associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName is the storage + Policy Based Management (SPBM) profile name. + type: string + volumePath: + description: volumePath is the path that identifies + vSphere volume vmdk + type: string required: - - name + - volumePath type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - required: - - containers - type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - containers type: object type: object - type: object - nodeSelector: - additionalProperties: - type: string - type: object - prepareScript: - type: string - raw: - properties: - artifact: + version: type: string - entrypoint: - items: - type: string - type: array - environment: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array + required: + - carrier + - version type: object - role: - type: string - runScript: - type: string - sshPublicKey: - type: string - tags: - items: - description: |- - JobTag 表示一个任务标签,由 key 和多个 value 组成。 - key 和每个 value 长度均不超过 10 个字符;一个任务最多 10 个标签; - 每个标签最多包含 10 个不同的 value。 - properties: - key: - type: string - values: - items: - type: string - type: array - required: - - key - - values - type: object - type: array - tensorBoardDir: - type: string required: + - placement - role + - runtime + - workload type: object status: properties: @@ -8857,6 +8798,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map events: description: |- Events 在 Task 处于 Pending 期间由控制面 Task reconciler 从各节点 @@ -8894,11 +8838,29 @@ spec: type: array message: type: string + observedGeneration: + description: |- + ObservedGeneration 是数据面 Agent 最近一次完成本地工作负载调谐时所观测到的 + metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + phase / message / observedNodes 之前,应比较本字段与 metadata.generation + 以识别过期状态。 + format: int64 + type: integer observedNodes: + description: ObservedNodes 是当前承载该 Task 工作负载的节点名,由数据面 Agent 排序去重后上报。 items: type: string type: array phase: + description: |- + TaskPhase 是单个 Task 的生命周期阶段,由数据面 Agent 观测本地工作负载后上报。 + 取值集合与 JobPhase 对齐,Task 没有独立的 Stopping 中间态。 + enum: + - Pending + - Running + - Succeeded + - Failed + - Stopped type: string pullProgress: description: |- diff --git a/api/config/crd/bases/rlinf.io_workflows.yaml b/api/config/crd/bases/rlinf.io_workflows.yaml index 7aba640..92c6331 100644 --- a/api/config/crd/bases/rlinf.io_workflows.yaml +++ b/api/config/crd/bases/rlinf.io_workflows.yaml @@ -50,6 +50,9 @@ spec: items: properties: dependencies: + description: |- + Dependencies 是同一 Workflow 内其它 Job 模板的名字,依赖关系只存在于 + Job 之间,不存在于 Job 内部的 Task 模板之间。 items: type: string type: array @@ -61,14 +64,21 @@ spec: type: string sshPublicKey: type: string - stopped: + suspended: + description: Setting spec.suspended to true starts an orderly + stop without deleting the Job resource. The Job becomes + Stopped and is archived into the persistence backend after + ArchiveTTL (default 5 minutes), while the Job CR is deleted + from kcp. Starting the Job via POST /jobs/:name/start + restores it from the persistence backend with the same + name and spec but a new Kubernetes UID. type: boolean tags: items: description: |- JobTag 表示一个任务标签,由 key 和多个 value 组成。 - key 和每个 value 长度均不超过 10 个字符;一个任务最多 10 个标签; - 每个标签最多包含 10 个不同的 value。 + 标签的个数与 key/value 长度上限不在 CRD Schema 层封闭,由 Gateway 在写入 + 路径上校验,详见开发者文档的 API 约定。 properties: key: type: string @@ -84,156 +94,438 @@ spec: tasks: items: properties: - agentType: + downstreamName: + type: string + environments: + items: + description: |- + TaskEnvironment 表示 Task 请求的一种可扩展环境能力。 + Type 是带所有者作用域的稳定类型标识,Version 表示该类型的参数版本。 + Parameters 必须由对应的已注册 Handler 严格解码和校验;未知类型、未知版本或 + 非法参数必须在产生任何外部副作用前被拒绝。 + properties: + parameters: + x-kubernetes-preserve-unknown-fields: true + type: + type: string + version: + type: string + required: + - type + - version + type: object + type: array + head: + type: boolean + name: type: string - docker: + placement: + description: TaskPlacementSpec describes scheduling + constraints for the workload. properties: - containers: - items: - properties: - args: - items: - type: string - type: array - command: - items: - type: string - type: array - environment: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array - image: - type: string - name: - type: string - volumes: - items: - properties: - source: - type: string - target: - type: string - type: object - type: array - type: object - type: array + nodeSelector: + additionalProperties: + type: string + type: object type: object - domain: - type: string - downstreamName: + role: + description: |- + TaskRole 描述 Task 在业务编排中的角色,用于前端分组与展示。 + 该字段当前不在 CRD 层做枚举校验:它可能承载上层编排框架的自定义角色名, + 收窄取值会阻止合法的既有数据写入。请勿据此推断取值的封闭集合。 type: string - head: + runtime: + description: |- + TaskRuntimeSpec selects the runtime implementation and instance that lowers + the common Pod template. Name is a stable runtime instance identifier; it is + not a display name or proof of ownership. + properties: + kind: + description: |- + RuntimeKind 表示负责执行 Task 工作负载的 Runtime 类型。 + CRD 有意不限制该字符串的枚举值,使 Docker、Raw 等 Runtime 可以在不修改 + Task Schema 的情况下扩展。Agent 必须在产生任何外部副作用前,通过已注册的 + Provider 和能力校验拒绝未知或尚未支持的 Runtime 类型。 + type: string + name: + type: string + required: + - kind + type: object + suspended: type: boolean - kubernetes: + tags: + items: + description: |- + JobTag 表示一个任务标签,由 key 和多个 value 组成。 + 标签的个数与 key/value 长度上限不在 CRD Schema 层封闭,由 Gateway 在写入 + 路径上校验,详见开发者文档的 API 约定。 + properties: + key: + type: string + values: + items: + type: string + type: array + required: + - key + - values + type: object + type: array + workload: + description: |- + TaskWorkloadSpec is the common workload declaration for every runtime. + Kubernetes applies the Pod template natively. Future Docker and Raw providers + lower the subset they support and reject unsupported fields before producing + external effects. properties: - workload: + carrier: + description: |- + TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a + workload. Type and Version identify a carrier contract; Parameters remain + opaque until the selected Adapter or Runtime implementation strictly decodes + them. Carrier identifiers are open strings, not CRD enums. properties: - kind: + parameters: + x-kubernetes-preserve-unknown-fields: true + type: type: string - pvcSizeGbMap: - additionalProperties: - format: int32 - type: integer - description: 'Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests - instead.' - type: object - pvcStorageMap: - additionalProperties: - type: string - description: 'Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.StorageClassName - instead.' - type: object - replicas: - format: int32 - type: integer - template: - description: PodTemplateSpec describes the - data a pod should have when created from - a template + version: + type: string + required: + - type + - version + type: object + kind: + description: |- + WorkloadKind identifies the workload semantics independently of its Runtime + carrier. The CRD deliberately keeps this identifier open; registered + Adapters must reject unsupported kinds before producing external effects. + type: string + parameters: + x-kubernetes-preserve-unknown-fields: true + template: + description: PodTemplateSpec describes the data + a pod should have when created from a template + properties: + metadata: + description: |- + Standard object's metadata. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata properties: - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + annotations: + additionalProperties: + type: string type: object - spec: + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: |- + Specification of the desired behavior of the pod. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + properties: + activeDeadlineSeconds: description: |- - Specification of the desired behavior of the pod. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + Optional duration in seconds the pod may be active on the node relative to + StartTime before the system will actively try to mark it failed and kill associated containers. + Value must be a positive integer. + format: int64 + type: integer + affinity: + description: If specified, the pod's scheduling + constraints properties: - activeDeadlineSeconds: - description: |- - Optional duration in seconds the pod may be active on the node relative to - StartTime before the system will actively try to mark it failed and kill associated containers. - Value must be a positive integer. - format: int64 - type: integer - affinity: - description: If specified, the pod's - scheduling constraints + nodeAffinity: + description: Describes node affinity + scheduling rules for the pod. properties: - nodeAffinity: - description: Describes node affinity - scheduling rules for the pod. + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node matches the corresponding matchExpressions; the + node(s) with the highest sum are the most preferred. + items: + description: |- + An empty preferred scheduling term matches all objects with implicit weight 0 + (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + properties: + preference: + description: A node selector + term, associated with + the corresponding weight. + properties: + matchExpressions: + description: A list + of node selector requirements + by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The + label key that + the selector + applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list + of node selector requirements + by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The + label key that + the selector + applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + description: Weight associated + with matching the corresponding + nodeSelectorTerm, in the + range 1-100. + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to an update), the system + may or may not try to eventually evict the pod from its node. properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node matches the corresponding matchExpressions; the - node(s) with the highest sum are the most preferred. + nodeSelectorTerms: + description: Required. A list + of node selector terms. + The terms are ORed. items: description: |- - An empty preferred scheduling term matches all objects with implicit weight 0 - (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op). + A null or empty node selector term matches no objects. The requirements of + them are ANDed. + The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. + properties: + matchExpressions: + description: A list + of node selector requirements + by node's labels. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The + label key that + the selector + applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + description: A list + of node selector requirements + by node's fields. + items: + description: |- + A node selector requirement is a selector that contains values, a key, and an operator + that relates the key and values. + properties: + key: + description: The + label key that + the selector + applies to. + type: string + operator: + description: |- + Represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + type: string + values: + description: |- + An array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. If the operator is Gt or Lt, the values + array must have a single element, which will be interpreted as an integer. + This array is replaced during a strategic merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + description: Describes pod affinity + scheduling rules (e.g. co-locate + this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling affinity expressions, etc.), + compute a sum by iterating through the elements of this field and adding + "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of + all of the matched WeightedPodAffinityTerm + fields are added per-node + to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A + pod affinity term, associated + with the corresponding + weight. properties: - preference: - description: A node - selector term, associated - with the corresponding - weight. + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. properties: matchExpressions: - description: A list - of node selector - requirements by - node's labels. + description: matchExpressions + is a list of label + selector requirements. + The requirements + are ANDed. items: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: The - label key - that the - selector + description: key + is the label + key that + the selector applies to. type: string operator: description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- - An array of string values. If the operator is In or NotIn, + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -244,36 +536,82 @@ spec: type: object type: array x-kubernetes-list-type: atomic - matchFields: - description: A list - of node selector - requirements by - node's fields. + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions + is a list of label + selector requirements. + The requirements + are ANDed. items: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: The - label key - that the - selector + description: key + is the label + key that + the selector applies to. type: string operator: description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string values: description: |- - An array of string values. If the operator is In or NotIn, + values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. + the values array must be empty. This array is replaced during a strategic + merge patch. items: type: string type: array @@ -284,360 +622,259 @@ spec: type: object type: array x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object x-kubernetes-map-type: atomic - weight: - description: Weight - associated with matching - the corresponding - nodeSelectorTerm, - in the range 1-100. - format: int32 - type: integer + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string required: - - preference - - weight + - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to an update), the system - may or may not try to eventually evict the pod from its node. - properties: - nodeSelectorTerms: - description: Required. - A list of node selector - terms. The terms are - ORed. - items: - description: |- - A null or empty node selector term matches no objects. The requirements of - them are ANDed. - The TopologySelectorTerm type implements a subset of the NodeSelectorTerm. - properties: - matchExpressions: - description: A list - of node selector - requirements by - node's labels. - items: + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. + properties: + matchExpressions: + description: matchExpressions + is a list of label + selector requirements. + The requirements are + ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key + is the label + key that the + selector applies + to. + type: string + operator: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The - label key - that the - selector - applies - to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchFields: - description: A list - of node selector - requirements by - node's fields. - items: + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: description: |- - A node selector requirement is a selector that contains values, a key, and an operator - that relates the key and values. - properties: - key: - description: The - label key - that the - selector - applies - to. - type: string - operator: - description: |- - Represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. - type: string - values: - description: |- - An array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. If the operator is Gt or Lt, the values - array must have a single element, which will be interpreted as an integer. - This array is replaced during a strategic merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-type: atomic - required: - - nodeSelectorTerms - type: object - x-kubernetes-map-type: atomic - type: object - podAffinity: - description: Describes pod affinity - scheduling rules (e.g. co-locate - this pod in the same node, zone, - etc. as some other pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling affinity expressions, etc.), - compute a sum by iterating through the elements of this field and adding - "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights - of all of the matched - WeightedPodAffinityTerm - fields are added per-node - to find the most preferred - node(s) + type: object + x-kubernetes-map-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + 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. + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. properties: - podAffinityTerm: - description: Required. - A pod affinity term, - associated with the - corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list - of label selector - requirements. - The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the - label - key - that - the - selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - 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. - items: + matchExpressions: + description: matchExpressions + is a list of label + selector requirements. + The requirements are + ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key + is the label + key that the + selector applies + to. type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list - of label selector - requirements. - The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the - label - key - that - the - selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + description: Describes pod anti-affinity + scheduling rules (e.g. avoid putting + this pod in the same node, zone, + etc. as some other pod(s)). + properties: + preferredDuringSchedulingIgnoredDuringExecution: + description: |- + The scheduler will prefer to schedule pods to nodes that satisfy + the anti-affinity expressions specified by this field, but it may choose + a node that violates one or more of the expressions. The node that is + most preferred is the one with the greatest sum of weights, i.e. + for each node that meets all of the scheduling requirements (resource + request, requiredDuringScheduling anti-affinity expressions, etc.), + compute a sum by iterating through the elements of this field and subtracting + "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the + node(s) with the highest sum are the most preferred. + items: + description: The weights of + all of the matched WeightedPodAffinityTerm + fields are added per-node + to find the most preferred + node(s) + properties: + podAffinityTerm: + description: Required. A + pod affinity term, associated + with the corresponding + weight. properties: labelSelector: description: |- @@ -801,664 +1038,283 @@ spec: required: - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - type: object - podAntiAffinity: - description: Describes pod anti-affinity - scheduling rules (e.g. avoid - putting this pod in the same - node, zone, etc. as some other - pod(s)). - properties: - preferredDuringSchedulingIgnoredDuringExecution: - description: |- - The scheduler will prefer to schedule pods to nodes that satisfy - the anti-affinity expressions specified by this field, but it may choose - a node that violates one or more of the expressions. The node that is - most preferred is the one with the greatest sum of weights, i.e. - for each node that meets all of the scheduling requirements (resource - request, requiredDuringScheduling anti-affinity expressions, etc.), - compute a sum by iterating through the elements of this field and subtracting - "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the - node(s) with the highest sum are the most preferred. - items: - description: The weights - of all of the matched - WeightedPodAffinityTerm - fields are added per-node - to find the most preferred - node(s) + weight: + description: |- + weight associated with matching the corresponding podAffinityTerm, + in the range 1-100. + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + description: |- + If the anti-affinity requirements specified by this field are not met at + scheduling time, the pod will not be scheduled onto the node. + If the anti-affinity requirements specified by this field cease to be met + at some point during pod execution (e.g. due to a pod label update), the + system may or may not try to eventually evict the pod from its node. + When there are multiple elements, the lists of nodes corresponding to each + podAffinityTerm are intersected, i.e. all terms must be satisfied. + items: + description: |- + Defines a set of pods (namely those matching the labelSelector + relative to the given namespace(s)) that this pod should be + co-located (affinity) or not co-located (anti-affinity) with, + where co-located is defined as running on a node whose value of + the label with key matches that of any node on which + a pod of the set of pods is running + properties: + labelSelector: + description: |- + A label query over a set of resources, in this case pods. + If it's null, this PodAffinityTerm matches with no Pods. properties: - podAffinityTerm: - description: Required. - A pod affinity term, - associated with the - corresponding weight. - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list - of label selector - requirements. - The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the - label - key - that - the - selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string - type: array - x-kubernetes-list-type: atomic - 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. - items: + matchExpressions: + description: matchExpressions + is a list of label + selector requirements. + The requirements are + ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key + is the label + key that the + selector applies + to. type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: - description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list - of label selector - requirements. - The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the - label - key - that - the - selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey - type: object - weight: - description: |- - weight associated with matching the corresponding podAffinityTerm, - in the range 1-100. - format: int32 - type: integer - required: - - podAffinityTerm - - weight - type: object - type: array - x-kubernetes-list-type: atomic - requiredDuringSchedulingIgnoredDuringExecution: - description: |- - If the anti-affinity requirements specified by this field are not met at - scheduling time, the pod will not be scheduled onto the node. - If the anti-affinity requirements specified by this field cease to be met - at some point during pod execution (e.g. due to a pod label update), the - system may or may not try to eventually evict the pod from its node. - When there are multiple elements, the lists of nodes corresponding to each - podAffinityTerm are intersected, i.e. all terms must be satisfied. - items: - description: |- - Defines a set of pods (namely those matching the labelSelector - relative to the given namespace(s)) that this pod should be - co-located (affinity) or not co-located (anti-affinity) with, - where co-located is defined as running on a node whose value of - the label with key matches that of any node on which - a pod of the set of pods is running - properties: - labelSelector: - description: |- - A label query over a set of resources, in this case pods. - If it's null, this PodAffinityTerm matches with no Pods. - properties: - matchExpressions: - description: matchExpressions - is a list of label - selector requirements. - The requirements - are ANDed. - items: + values: description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label - key that - the selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - 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. - items: - type: string + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array x-kubernetes-list-type: atomic - 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. - items: + matchLabels: + additionalProperties: type: string - type: array - x-kubernetes-list-type: atomic - namespaceSelector: description: |- - A label query over the set of namespaces that the term applies to. - The term is applied to the union of the namespaces selected by this field - and the ones listed in the namespaces field. - null selector and null or empty namespaces list means "this pod's namespace". - An empty selector ({}) matches all namespaces. - properties: - matchExpressions: - description: matchExpressions - is a list of label - selector requirements. - The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the label - key that - the selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - x-kubernetes-map-type: atomic - namespaces: - description: |- - namespaces specifies a static list of namespace names that the term applies to. - The term is applied to the union of the namespaces listed in this field - and the ones selected by namespaceSelector. - null or empty namespaces list and null namespaceSelector means "this pod's namespace". - items: - type: string - type: array - x-kubernetes-list-type: atomic - topologyKey: - description: |- - This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching - the labelSelector in the specified namespaces, where co-located is defined as running on a node - whose value of the label with key topologyKey matches that of any node on which any of the - selected pods is running. - Empty topologyKey is not allowed. - type: string - required: - - topologyKey type: object - type: array - x-kubernetes-list-type: atomic - type: object - type: object - automountServiceAccountToken: - description: AutomountServiceAccountToken - indicates whether a service account - token should be automatically mounted. - type: boolean - containers: - description: |- - List of containers belonging to the pod. - Containers cannot currently be added or removed. - There must be at least one container in a Pod. - Cannot be updated. - items: - description: A single application - container that you want to run - within a pod. - properties: - args: - description: |- - 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - env: - description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents - an environment variable - present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. + x-kubernetes-map-type: atomic + 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. + items: type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". + type: array + x-kubernetes-list-type: atomic + 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. + items: type: string - valueFrom: - description: Source for - the environment variable's - value. Cannot be used - if value is not empty. - properties: - configMapKeyRef: - description: Selects - a key of a ConfigMap. - properties: - key: - description: The - key to select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify - whether the - ConfigMap or - its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version - of the schema - the FieldPath - is written in - terms of, defaults - to "v1". - type: string - fieldPath: - description: Path - of the field - to select in - the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + description: |- + A label query over the set of namespaces that the term applies to. + The term is applied to the union of the namespaces selected by this field + and the ones listed in the namespaces field. + null selector and null or empty namespaces list means "this pod's namespace". + An empty selector ({}) matches all namespaces. + properties: + matchExpressions: + description: matchExpressions + is a list of label + selector requirements. + The requirements are + ANDed. + items: description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + description: key + is the label + key that the + selector applies + to. type: string - optional: - default: false + operator: description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The - name of the - volume mount - containing the - env file. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container - name: required - for volumes, - optional for - env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format - of the exposed - resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to - select' - type: string - required: - - resource + - operator type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects - a key of a secret - in the pod's namespace - properties: - key: - description: The - key of the secret - to select from. Must - be a valid secret - key. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify - whether the - Secret or its - key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource - represents the source of - a set of ConfigMaps or Secrets + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + description: |- + namespaces specifies a static list of namespace names that the term applies to. + The term is applied to the union of the namespaces listed in this field + and the ones selected by namespaceSelector. + null or empty namespaces list and null namespaceSelector means "this pod's namespace". + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + description: |- + This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + the labelSelector in the specified namespaces, where co-located is defined as running on a node + whose value of the label with key topologyKey matches that of any node on which any of the + selected pods is running. + Empty topologyKey is not allowed. + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + automountServiceAccountToken: + description: AutomountServiceAccountToken + indicates whether a service account + token should be automatically mounted. + type: boolean + containers: + description: |- + List of containers belonging to the pod. + Containers cannot currently be added or removed. + There must be at least one container in a Pod. + Cannot be updated. + items: + description: A single application container + that you want to run within a pod. + properties: + args: + description: |- + 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents + an environment variable present + in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the + environment variable's value. + Cannot be used if value + is not empty. properties: - configMapRef: - description: The ConfigMap - to select from + configMapKeyRef: + description: Selects a + key of a ConfigMap. properties: + key: + description: The key + to select. + type: string name: default: "" description: |- @@ -1471,19 +1327,115 @@ spec: optional: description: Specify whether the ConfigMap - must be defined + or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret - to select from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version + of the schema the + FieldPath is written + in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path + of the field to + select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name + of the volume mount + containing the env + file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container + name: required for + volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format + of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a + key of a secret in the + pod's namespace properties: + key: + description: The key + of the secret to + select from. Must + be a valid secret + key. + type: string name: default: "" description: |- @@ -1496,301 +1448,107 @@ spec: optional: description: Specify whether the Secret - must be defined + or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - 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 and StatefulSets. - type: string - imagePullPolicy: - description: |- - 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 - type: string - lifecycle: - description: |- - Actions that the management system should take in response to container lifecycle events. - Cannot be updated. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies - a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet - specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set - in the request. - HTTP allows repeated - headers. - items: - description: HTTPHeader - describes a - custom header - to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path - to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the - container should sleep. - properties: - seconds: - description: Seconds - is the number - of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to - the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies - a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet - specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set - in the request. - HTTP allows repeated - headers. - items: - description: HTTPHeader - describes a - custom header - to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path - to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the - container should sleep. - properties: - seconds: - description: Seconds - is the number - of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to - the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents + the source of a set of ConfigMaps + or Secrets + properties: + configMapRef: + description: The ConfigMap + to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether + the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to + select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether + the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + 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 and StatefulSets. + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: |- + Actions that the management system should take in response to container lifecycle events. + Cannot be updated. + properties: + postStart: description: |- - Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies @@ -1809,34 +1567,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to @@ -1896,28 +1626,25 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents + a duration that the container + should sleep. + properties: + seconds: + description: Seconds + is the number of seconds + to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: @@ -1937,93 +1664,18 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - name: + preStop: description: |- - Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: |- - 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. - 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. - items: - description: ContainerPort - represents a network port - in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host - IP to bind the external - port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: |- - Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies @@ -2042,34 +1694,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to @@ -2129,28 +1753,25 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents + a duration that the container + should sleep. + properties: + seconds: + description: Seconds + is the number of seconds + to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: @@ -2170,1054 +1791,1241 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: + type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: |- + Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. format: int32 type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - resizePolicy: + initialDelaySeconds: description: |- - Resources resize policy for the container. - This field cannot be set on ephemeral containers. - items: - description: ContainerResizePolicy - represents resource resize - policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: |- + 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. + 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. + items: + description: ContainerPort represents + a network port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP + to bind the external port + to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: |- + Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: description: |- - Compute Resources required by this container. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. properties: - claims: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. + format: int32 + type: integer + service: + default: "" description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. items: - description: ResourceClaim - references one entry - in PodSpec.ResourceClaims. + description: HTTPHeader + describes a custom header + to be used in HTTP probes properties: name: 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. + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + value: + description: The header + field value type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: 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/ - type: object + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - restartPolicy: - description: |- - RestartPolicy defines the restart behavior of individual containers in a pod. - This overrides the pod-level restart policy. When this field is not specified, - the restart behavior is defined by the Pod's restart policy and the container type. - Additionally, 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. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. The rules are evaluated in - order. Once a rule matches a container exit condition, the remaining - rules are ignored. If no rule matches the container exit condition, - the Container-level restart policy determines the whether the container - is restarted or not. Constraints on the rules: - - At most 20 rules are allowed. - - Rules can have the same action. - - Identical rules are not forbidden in validations. - When rules are specified, container MUST set RestartPolicy explicitly - even it if matches the Pod's RestartPolicy. + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: |- + Resources resize policy for the container. + This field cannot be set on ephemeral containers. + items: + description: ContainerResizePolicy + represents resource resize policy + for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Compute Resources required by this container. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. items: - description: ContainerRestartRule - describes how a container - exit is handled. + description: ResourceClaim + references one entry in + PodSpec.ResourceClaims. properties: - action: + name: description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string - exitCodes: - description: Represents - the exit codes to check - on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object required: - - action + - name type: object type: array - x-kubernetes-list-type: atomic - securityContext: + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + RestartPolicy defines the restart behavior of individual containers in a pod. + This overrides the pod-level restart policy. When this field is not specified, + the restart behavior is defined by the Pod's restart policy and the container type. + Additionally, 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. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. The rules are evaluated in + order. Once a rule matches a container exit condition, the remaining + rules are ignored. If no rule matches the container exit condition, + the Container-level restart policy determines the whether the container + is restarted or not. Constraints on the rules: + - At most 20 rules are allowed. + - Rules can have the same action. + - Identical rules are not forbidden in validations. + When rules are specified, container MUST set RestartPolicy explicitly + even it if matches the Pod's RestartPolicy. + items: + description: ContainerRestartRule + describes how a container exit + is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the + exit codes to check on container + exits. + properties: + operator: + description: |- + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. + type: string + values: + description: |- + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + SecurityContext defines the security options the container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + properties: + allowPrivilegeEscalation: + description: |- + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + appArmorProfile: description: |- - SecurityContext defines the security options the container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + 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. properties: - allowPrivilegeEscalation: + localhostProfile: description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - appArmorProfile: + 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". + type: string + type: 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: - description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability - represent POSIX - capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed - capabilities - items: - description: Capability - represent POSIX - capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type + type: object + capabilities: + description: |- + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability + represent POSIX capabilities + type + type: string + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability + represent POSIX capabilities + type + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux + level label that applies + to the container. + type: string + role: + description: Role is a SELinux + role label that applies + to the container. + type: string + type: + description: Type is a SELinux + type label that applies + to the container. + type: string + user: + description: User is a SELinux + user label that applies + to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. + 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 be set if type is "Localhost". Must NOT be set for any other type. type: string - readOnlyRootFilesystem: + type: description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA + credential spec to use. + type: string + hostProcess: description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. + HostProcess determines if a container should be run as a 'Host 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. type: boolean - runAsUser: + runAsUserName: description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is - SELinux level label - that applies to the - container. - type: string - role: - description: Role is - a SELinux role label - that applies to the - container. - type: string - type: - description: Type is - a SELinux type label - that applies to the - container. - type: string - user: - description: User is - a SELinux user label - that applies to the - container. - type: string - type: object - seccompProfile: - description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: - description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the - GMSA credential spec - to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object + type: string type: object - startupProbe: - description: |- - StartupProbe indicates that the Pod has successfully initialized. - If specified, no other probes are executed until this completes successfully. - If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + type: object + startupProbe: + description: |- + StartupProbe indicates that the Pod has successfully initialized. + If specified, no other probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + when it might take a long time to load data or warm a cache, than during steady-state operation. + This cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies + a command to execute in the + container. properties: - exec: - description: Exec specifies - a command to execute in - the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: + command: description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to - perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set in - the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom - header to be used - in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to - access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. format: int32 type: integer - periodSeconds: + service: + default: "" description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - stdin: + initialDelaySeconds: description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is - the list of block devices - to be used by the container. - items: - description: volumeDevice - describes a mapping of a - raw block device within - a container. - properties: - devicePath: - description: devicePath - is the path inside of - the container that the - device will be mapped - to. - type: string - name: - description: name must - match the name of a - persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - devicePath - x-kubernetes-list-type: map - volumeMounts: + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: description: |- - Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes - a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must - match the Name of a - Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the + list of block devices to be used + by the container. + items: + description: volumeDevice describes + a mapping of a raw block device + within a container. + properties: + devicePath: + description: devicePath is + the path inside of the container + that the device will be + mapped to. + type: string + name: + description: name must match + the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes + a mounting of a Volume within + a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match + the Name of a Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. - If ReadOnly is false, this field has no meaning and must be unspecified. + If ReadOnly is false, this field has no meaning and must be unspecified. - If 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. + If 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. - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: - description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. - type: string - required: - - name - type: object + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + dnsConfig: + description: |- + Specifies the DNS parameters of a pod. + Parameters specified here will be merged to the generated DNS + configuration based on DNSPolicy. + properties: + nameservers: + description: |- + A list of DNS name server IP addresses. + This will be appended to the base nameservers generated from DNSPolicy. + Duplicated nameservers will be removed. + items: + type: string type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - dnsConfig: + x-kubernetes-list-type: atomic + options: description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: + A list of DNS resolver options. + This will be merged with the base options generated from DNSPolicy. + Duplicated entries will be removed. Resolution options given in Options + will override those that appear in the base DNSPolicy. + items: + description: PodDNSConfigOption + defines DNS resolver options of + a pod. + properties: + name: + description: |- + Name is this DNS resolver option's name. + Required. type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption - defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this - DNS resolver option's - value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: + value: + description: Value is this DNS + resolver option's value. type: string - type: array - x-kubernetes-list-type: atomic - type: object - 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 'ClusterFirstWithHostNet'. - type: string - enableServiceLinks: - description: |- - EnableServiceLinks indicates whether information about services should be injected into pod's - environment variables, matching the syntax of Docker links. - Optional: Defaults to true. - type: boolean - ephemeralContainers: + type: object + type: array + x-kubernetes-list-type: atomic + searches: description: |- - List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing - pod to perform user-initiated actions such as debugging. This list cannot be specified when - creating a pod, and it cannot be modified by updating the pod spec. In order to add an - ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + A list of DNS search domains for host-name lookup. + This will be appended to the base search paths generated from DNSPolicy. + Duplicated search paths will be removed. items: - description: |- - An EphemeralContainer is a temporary container that you may add to an existing Pod for - user-initiated activities such as debugging. Ephemeral containers have no resource or - scheduling guarantees, and they will not be restarted when they exit or when a Pod is - removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the - Pod to exceed its resource allocation. - - To add an ephemeral container, use the ephemeralcontainers subresource of an existing - Pod. Ephemeral containers may not be removed or restarted. - properties: - args: - description: |- - Arguments to the entrypoint. - The 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - Entrypoint array. Not executed within a shell. - The 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: - type: string - type: array - x-kubernetes-list-type: atomic - env: - description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents - an environment variable - present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for - the environment variable's - value. Cannot be used - if value is not empty. - properties: - configMapKeyRef: - description: Selects - a key of a ConfigMap. - properties: - key: - description: The - key to select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify - whether the - ConfigMap or - its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version - of the schema - the FieldPath - is written in - terms of, defaults - to "v1". - type: string - fieldPath: - description: Path - of the field - to select in - the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. - type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The - name of the - volume mount - containing the - env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container - name: required - for volumes, - optional for - env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format - of the exposed - resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects - a key of a secret - in the pod's namespace - properties: - key: - description: The - key of the secret - to select from. Must - be a valid secret - key. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify - whether the - Secret or its - key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource - represents the source of - a set of ConfigMaps or Secrets + type: string + type: array + x-kubernetes-list-type: atomic + type: object + 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 'ClusterFirstWithHostNet'. + type: string + enableServiceLinks: + description: |- + EnableServiceLinks indicates whether information about services should be injected into pod's + environment variables, matching the syntax of Docker links. + Optional: Defaults to true. + type: boolean + ephemeralContainers: + description: |- + List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + pod to perform user-initiated actions such as debugging. This list cannot be specified when + creating a pod, and it cannot be modified by updating the pod spec. In order to add an + ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + items: + description: |- + An EphemeralContainer is a temporary container that you may add to an existing Pod for + user-initiated activities such as debugging. Ephemeral containers have no resource or + scheduling guarantees, and they will not be restarted when they exit or when a Pod is + removed or restarted. The kubelet may evict a Pod if an ephemeral container causes the + Pod to exceed its resource allocation. + + To add an ephemeral container, use the ephemeralcontainers subresource of an existing + Pod. Ephemeral containers may not be removed or restarted. + properties: + args: + description: |- + Arguments to the entrypoint. + The 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + Entrypoint array. Not executed within a shell. + The 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents + an environment variable present + in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. + type: string + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". + type: string + valueFrom: + description: Source for the + environment variable's value. + Cannot be used if value + is not empty. properties: - configMapRef: - description: The ConfigMap - to select from + configMapKeyRef: + description: Selects a + key of a ConfigMap. properties: + key: + description: The key + to select. + type: string name: default: "" description: |- @@ -3230,543 +3038,225 @@ spec: optional: description: Specify whether the ConfigMap - must be defined + or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret - to select from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. properties: - name: - default: "" - description: |- - 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 + apiVersion: + description: Version + of the schema the + FieldPath is written + in terms of, defaults + to "v1". type: string - optional: - description: Specify - whether the Secret - must be defined - type: boolean + fieldPath: + description: Path + of the field to + select in the specified + API version. + type: string + required: + - fieldPath type: object x-kubernetes-map-type: atomic - type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - Container image name. - More info: https://kubernetes.io/docs/concepts/containers/images - type: string - imagePullPolicy: - description: |- - 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 - type: string - lifecycle: - description: Lifecycle is not - allowed for ephemeral containers. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies - a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet - specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set - in the request. - HTTP allows repeated - headers. - items: - description: HTTPHeader - describes a - custom header - to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path - to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the - container should sleep. - properties: - seconds: - description: Seconds - is the number - of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to - the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies - a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet - specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set - in the request. - HTTP allows repeated - headers. - items: - description: HTTPHeader - describes a - custom header - to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path - to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the - container should sleep. - properties: - seconds: - description: Seconds - is the number - of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to - the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: - description: Probes are not - allowed for ephemeral containers. - properties: - exec: - description: Exec specifies - a command to execute in - the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to - perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set in - the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom - header to be used - in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to - access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - type: object - name: - description: |- - Name of the ephemeral container specified as a DNS_LABEL. - This name must be unique among all containers, init containers and ephemeral containers. - type: string - ports: - description: Ports are not allowed - for ephemeral containers. - items: - description: ContainerPort - represents a network port - in a single container. - properties: - containerPort: + fileKeyRef: description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host - IP to bind the external - port to. - type: string - hostPort: + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name + of the volume mount + containing the env + file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + properties: + containerName: + description: 'Container + name: required for + volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format + of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a + key of a secret in the + pod's namespace + properties: + key: + description: The key + of the secret to + select from. Must + be a valid secret + key. + type: string + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify + whether the Secret + or its key must + be defined + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents + the source of a set of ConfigMaps + or Secrets + properties: + configMapRef: + description: The ConfigMap + to select from + properties: name: + default: "" description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. + 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 type: string - protocol: - default: TCP + optional: + description: Specify whether + the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to + select from + properties: + name: + default: "" description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". + 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 type: string - required: - - containerPort + optional: + description: Specify whether + the Secret must be defined + type: boolean type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: - description: Probes are not - allowed for ephemeral containers. + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + Container image name. + More info: https://kubernetes.io/docs/concepts/containers/images + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: Lifecycle is not allowed + for ephemeral containers. + properties: + postStart: + description: |- + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies @@ -3785,34 +3275,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to @@ -3832,458 +3294,96 @@ spec: description: HTTPHeader describes a custom header to be used - in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to - access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - type: object - resizePolicy: - description: Resources resize - policy for the container. - items: - description: ContainerResizePolicy - represents resource resize - policy for the container. - properties: - resourceName: - description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. - type: string - restartPolicy: - description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. - type: string - required: - - resourceName - - restartPolicy - type: object - type: array - x-kubernetes-list-type: atomic - resources: - description: |- - Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources - already allocated to the pod. - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim - references one entry - in PodSpec.ResourceClaims. - properties: - name: - 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. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - 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/ - type: object - type: object - restartPolicy: - description: |- - Restart policy for the container to manage the restart behavior of each - container within a pod. - You cannot set this field on ephemeral containers. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. You cannot set this field on - ephemeral containers. - items: - description: ContainerRestartRule - describes how a container - exit is handled. - properties: - action: - description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. - type: string - exitCodes: - description: Represents - the exit codes to check - on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object - required: - - action - type: object - type: array - x-kubernetes-list-type: atomic - securityContext: - description: |- - Optional: SecurityContext defines the security options the ephemeral container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - properties: - allowPrivilegeEscalation: - description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: - description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability - represent POSIX - capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed - capabilities - items: - description: Capability - represent POSIX - capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: - description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. - type: string - readOnlyRootFilesystem: - description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is - SELinux level label - that applies to the - container. - type: string - role: - description: Role is - a SELinux role label - that applies to the - container. - type: string - type: - description: Type is - a SELinux type label - that applies to the - container. - type: string - user: - description: User is - a SELinux user label - that applies to the - container. + in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The + header field + value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to + access on the HTTP + server. type: string - type: object - seccompProfile: - description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: + port: + anyOf: + - type: integer + - type: string description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. + Scheme to use for connecting to the host. + Defaults to HTTP. type: string required: - - type + - port + type: object + sleep: + description: Sleep represents + a duration that the container + should sleep. + properties: + seconds: + description: Seconds + is the number of seconds + to sleep. + format: int64 + type: integer + required: + - seconds type: object - windowsOptions: + tcpSocket: description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the - GMSA credential spec - to use. + host: + description: 'Optional: + Host name to connect + to, defaults to the + pod IP.' type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: + port: + anyOf: + - type: integer + - type: string description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object type: object - startupProbe: - description: Probes are not - allowed for ephemeral containers. + preStop: + description: |- + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies @@ -4302,34 +3402,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to @@ -4389,28 +3461,25 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents + a duration that the container + should sleep. + properties: + seconds: + description: Seconds + is the number of seconds + to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: @@ -4430,555 +3499,1246 @@ spec: required: - port type: object - terminationGracePeriodSeconds: + type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: Probes are not allowed + for ephemeral containers. + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. + format: int32 type: integer - timeoutSeconds: + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the ephemeral container specified as a DNS_LABEL. + This name must be unique among all containers, init containers and ephemeral containers. + type: string + ports: + description: Ports are not allowed + for ephemeral containers. + items: + description: ContainerPort represents + a network port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP + to bind the external port + to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: Probes are not allowed + for ephemeral containers. + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. format: int32 type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - stdin: + initialDelaySeconds: description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - targetContainerName: + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: Resources resize policy + for the container. + items: + description: ContainerResizePolicy + represents resource resize policy + for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + already allocated to the pod. + properties: + claims: description: |- - If set, the name of the container from PodSpec that this ephemeral container targets. - The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. - If not set then the ephemeral container uses the namespaces configured in the Pod spec. + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. - The container runtime must implement support for this feature. If the runtime does not - support namespace targeting then the result of setting this field is undefined. - type: string - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: - description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is - the list of block devices - to be used by the container. + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. items: - description: volumeDevice - describes a mapping of a - raw block device within - a container. + description: ResourceClaim + references one entry in + PodSpec.ResourceClaims. properties: - devicePath: - description: devicePath - is the path inside of - the container that the - device will be mapped - to. - type: string name: - description: name must - match the name of a - persistentVolumeClaim - in the pod + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string required: - - devicePath - name type: object type: array x-kubernetes-list-map-keys: - - devicePath + - name x-kubernetes-list-type: map - volumeMounts: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. - Cannot be updated. - items: - description: VolumeMount describes - a mounting of a Volume within - a container. + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + Restart policy for the container to manage the restart behavior of each + container within a pod. + You cannot set this field on ephemeral containers. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. You cannot set this field on + ephemeral containers. + items: + description: ContainerRestartRule + describes how a container exit + is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the + exit codes to check on container + exits. properties: - mountPath: + operator: description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. type: string - mountPropagation: + values: 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + Optional: SecurityContext defines the security options the ephemeral container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + properties: + allowPrivilegeEscalation: + description: |- + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + 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. + properties: + 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". + type: string + type: + description: |- + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type + type: object + capabilities: + description: |- + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. + properties: + add: + description: Added capabilities + items: + description: Capability + represent POSIX capabilities + type type: string - name: - description: This must - match the Name of a - Volume. + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability + represent POSIX capabilities + type type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If 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. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux + level label that applies + to the container. + type: string + role: + description: Role is a SELinux + role label that applies + to the container. + type: string + type: + description: Type is a SELinux + type label that applies + to the container. + type: string + user: + description: User is a SELinux + user label that applies + to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: + description: |- + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: + description: |- + type indicates which kind of seccomp profile will be applied. + Valid options are: - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: + description: |- + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA + credential spec to use. + type: string + hostProcess: + description: |- + HostProcess determines if a container should be run as a 'Host 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. + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + startupProbe: + description: Probes are not allowed + for ephemeral containers. + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: + description: |- + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. - type: string - required: - - name + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. + format: int32 + type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - hostAliases: - description: |- - HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts - file if specified. - items: + stdin: description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the - above IP address. - items: + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + targetContainerName: + description: |- + If set, the name of the container from PodSpec that this ephemeral container targets. + The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + If not set then the ephemeral container uses the namespaces configured in the Pod spec. + + The container runtime must implement support for this feature. If the runtime does not + support namespace targeting then the result of setting this field is undefined. + type: string + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the + list of block devices to be used + by the container. + items: + description: volumeDevice describes + a mapping of a raw block device + within a container. + properties: + devicePath: + description: devicePath is + the path inside of the container + that the device will be + mapped to. type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the - host file entry. - type: string - required: - - ip - type: object - type: array - x-kubernetes-list-map-keys: - - ip - x-kubernetes-list-type: map - hostIPC: - description: |- - Use the host's ipc namespace. - Optional: Default to false. - type: boolean - hostNetwork: - description: |- - Host networking requested for this pod. Use the host's network namespace. - When using HostNetwork you should specify ports so the scheduler is aware. - When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, - and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. - Default to false. - type: boolean - hostPID: - description: |- - Use the host's pid namespace. - Optional: Default to false. - type: boolean - hostUsers: - description: |- - Use the host's user namespace. - Optional: Default to true. - If set to true or not present, the pod will be run in the host user namespace, useful - for when the pod needs a feature only available to the host user namespace, such as - loading a kernel module with CAP_SYS_MODULE. - When set to false, a new userns is created for the pod. Setting false is useful for - mitigating container breakout vulnerabilities even allowing users to run their - containers as root without actually having root privileges on the host. - type: boolean - hostname: - description: |- - Specifies the hostname of the Pod - If not specified, the pod's hostname will be set to a system-defined value. - type: string - hostnameOverride: - description: |- - HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. - This field only specifies the pod's hostname and does not affect its DNS records. - When this field is set to a non-empty string: - - It takes precedence over the values set in `hostname` and `subdomain`. - - The Pod's hostname will be set to this value. - - `setHostnameAsFQDN` must be nil or set to false. - - `hostNetwork` must be set to false. + name: + description: name must match + the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. + Cannot be updated. + items: + description: VolumeMount describes + a mounting of a Volume within + a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match + the Name of a Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. + + If ReadOnly is false, this field has no meaning and must be unspecified. + + If 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. + + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). + + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + hostAliases: + description: |- + HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + file if specified. + items: + description: |- + HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the + pod's hosts file. + properties: + hostnames: + description: Hostnames for the above + IP address. + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + description: IP address of the host + file entry. + type: string + required: + - ip + type: object + type: array + x-kubernetes-list-map-keys: + - ip + x-kubernetes-list-type: map + hostIPC: + description: |- + Use the host's ipc namespace. + Optional: Default to false. + type: boolean + hostNetwork: + description: |- + Host networking requested for this pod. Use the host's network namespace. + When using HostNetwork you should specify ports so the scheduler is aware. + When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, + and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. + Default to false. + type: boolean + hostPID: + description: |- + Use the host's pid namespace. + Optional: Default to false. + type: boolean + hostUsers: + description: |- + Use the host's user namespace. + Optional: Default to true. + If set to true or not present, the pod will be run in the host user namespace, useful + for when the pod needs a feature only available to the host user namespace, such as + loading a kernel module with CAP_SYS_MODULE. + When set to false, a new userns is created for the pod. Setting false is useful for + mitigating container breakout vulnerabilities even allowing users to run their + containers as root without actually having root privileges on the host. + type: boolean + hostname: + description: |- + Specifies the hostname of the Pod + If not specified, the pod's hostname will be set to a system-defined value. + type: string + hostnameOverride: + description: |- + HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. + This field only specifies the pod's hostname and does not affect its DNS records. + When this field is set to a non-empty string: + - It takes precedence over the values set in `hostname` and `subdomain`. + - The Pod's hostname will be set to this value. + - `setHostnameAsFQDN` must be nil or set to false. + - `hostNetwork` must be set to false. - This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. - Requires the HostnameOverride feature gate to be enabled. - type: string - imagePullSecrets: - description: |- - ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. - If specified, these secrets will be passed to individual puller implementations for them to use. - More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod - items: + This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. + Requires the HostnameOverride feature gate to be enabled. + type: string + imagePullSecrets: + description: |- + ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + default: "" description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - initContainers: - description: |- - List of initialization containers belonging to the pod. - Init containers are executed in order prior to containers being started. If any - init container fails, the pod is considered to have failed and is handled according - to its restartPolicy. The name for an init container or normal container must be - unique among all containers. - Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. - The resourceRequirements of an init container are taken into account during scheduling - by finding the highest request/limit for each resource type, and then using the max of - that value or the sum of the normal containers. Limits are applied to init containers - in a similar fashion. - Init containers cannot currently be added or removed. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application - container that you want to run - within a pod. - properties: - args: - description: |- - 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: + 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 + type: string + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + initContainers: + description: |- + List of initialization containers belonging to the pod. + Init containers are executed in order prior to containers being started. If any + init container fails, the pod is considered to have failed and is handled according + to its restartPolicy. The name for an init container or normal container must be + unique among all containers. + Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + The resourceRequirements of an init container are taken into account during scheduling + by finding the highest request/limit for each resource type, and then using the max of + that value or the sum of the normal containers. Limits are applied to init containers + in a similar fashion. + Init containers cannot currently be added or removed. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + items: + description: A single application container + that you want to run within a pod. + properties: + args: + description: |- + 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + description: |- + 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 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 + of whether the variable exists or not. Cannot be updated. + More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + description: |- + List of environment variables to set in the container. + Cannot be updated. + items: + description: EnvVar represents + an environment variable present + in a Container. + properties: + name: + description: |- + Name of the environment variable. + May consist of any printable ASCII characters except '='. type: string - type: array - x-kubernetes-list-type: atomic - command: - description: |- - 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 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 - of whether the variable exists or not. Cannot be updated. - More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell - items: + value: + description: |- + Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in the container and + any service environment variables. 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 of whether the variable + exists or not. + Defaults to "". type: string - type: array - x-kubernetes-list-type: atomic - env: - description: |- - List of environment variables to set in the container. - Cannot be updated. - items: - description: EnvVar represents - an environment variable - present in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. 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 of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for - the environment variable's - value. Cannot be used - if value is not empty. - properties: - configMapKeyRef: - description: Selects - a key of a ConfigMap. - properties: - key: - description: The - key to select. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify - whether the - ConfigMap or - its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version - of the schema - the FieldPath - is written in - terms of, defaults - to "v1". - type: string - fieldPath: - description: Path - of the field - to select in - the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. - type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. - type: string - volumeName: - description: The - name of the - volume mount - containing the - env file. - type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container - name: required - for volumes, - optional for - env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format - of the exposed - resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects - a key of a secret - in the pod's namespace - properties: - key: - description: The - key of the secret - to select from. Must - be a valid secret - key. - type: string - name: - default: "" - description: |- - 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 - type: string - optional: - description: Specify - whether the - Secret or its - key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - envFrom: - description: |- - List of sources to populate environment variables in the container. - The keys defined within a source may consist of any printable ASCII characters except '='. - When a key exists in multiple - sources, the value associated with the last source will take precedence. - Values defined by an Env with a duplicate key will take precedence. - Cannot be updated. - items: - description: EnvFromSource - represents the source of - a set of ConfigMaps or Secrets + valueFrom: + description: Source for the + environment variable's value. + Cannot be used if value + is not empty. properties: - configMapRef: - description: The ConfigMap - to select from + configMapKeyRef: + description: Selects a + key of a ConfigMap. properties: + key: + description: The key + to select. + type: string name: default: "" description: |- @@ -4991,19 +4751,115 @@ spec: optional: description: Specify whether the ConfigMap - must be defined + or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - prefix: + fieldRef: description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret - to select from + Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + properties: + apiVersion: + description: Version + of the schema the + FieldPath is written + in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path + of the field to + select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + description: |- + FileKeyRef selects a key of the env file. + Requires the EnvFiles feature gate to be enabled. + properties: + key: + description: |- + The key within the env file. An invalid key will prevent the pod from starting. + The keys defined within a source may consist of any printable ASCII characters except '='. + During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: string + optional: + default: false + description: |- + Specify whether the file or its key must be defined. If the file or key + does not exist, then the env var is not published. + If optional is set to true and the specified key does not exist, + the environment variable will not be set in the Pod's containers. + + If optional is set to false and the specified key does not exist, + an error will be returned during Pod creation. + type: boolean + path: + description: |- + The path within the volume from which to select the file. + Must be relative and may not contain the '..' path or start with '..'. + type: string + volumeName: + description: The name + of the volume mount + containing the env + file. + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. properties: + containerName: + description: 'Container + name: required for + volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format + of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource to select' + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + description: Selects a + key of a secret in the + pod's namespace + properties: + key: + description: The key + of the secret to + select from. Must + be a valid secret + key. + type: string name: default: "" description: |- @@ -5016,301 +4872,107 @@ spec: optional: description: Specify whether the Secret - must be defined + or its key must + be defined type: boolean + required: + - key type: object x-kubernetes-map-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - image: - description: |- - 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 and StatefulSets. - type: string - imagePullPolicy: - description: |- - 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 - type: string - lifecycle: - description: |- - Actions that the management system should take in response to container lifecycle events. - Cannot be updated. - properties: - postStart: - description: |- - PostStart is called immediately after a container is created. If the handler fails, - the container is terminated and restarted according to its restart policy. - Other management of the container blocks until the hook completes. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies - a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet - specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set - in the request. - HTTP allows repeated - headers. - items: - description: HTTPHeader - describes a - custom header - to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path - to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the - container should sleep. - properties: - seconds: - description: Seconds - is the number - of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to - the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - preStop: - description: |- - PreStop is called immediately before a container is terminated due to an - API request or management event such as liveness/startup probe failure, - preemption, resource contention, etc. The handler is not called if the - container crashes or exits. The Pod's termination grace period countdown begins before the - PreStop hook is executed. Regardless of the outcome of the handler, the - container will eventually terminate within the Pod's termination grace - period (unless delayed by finalizers). Other management of the container blocks until the hook completes - or until the termination grace period is reached. - More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks - properties: - exec: - description: Exec specifies - a command to execute - in the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - httpGet: - description: HTTPGet - specifies an HTTP - GET request to perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set - in the request. - HTTP allows repeated - headers. - items: - description: HTTPHeader - describes a - custom header - to be used in - HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path - to access on the - HTTP server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - sleep: - description: Sleep represents - a duration that the - container should sleep. - properties: - seconds: - description: Seconds - is the number - of seconds to - sleep. - format: int64 - type: integer - required: - - seconds - type: object - tcpSocket: - description: |- - Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept - for backward compatibility. There is no validation of this field and - lifecycle hooks will fail at runtime when it is specified. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to - the pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - type: object - stopSignal: - description: |- - StopSignal defines which signal will be sent to a container when it is being stopped. - If not specified, the default is defined by the container runtime in use. - StopSignal can only be set for Pods with a non-empty .spec.os.name - type: string - type: object - livenessProbe: + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + description: |- + List of sources to populate environment variables in the container. + The keys defined within a source may consist of any printable ASCII characters except '='. + When a key exists in multiple + sources, the value associated with the last source will take precedence. + Values defined by an Env with a duplicate key will take precedence. + Cannot be updated. + items: + description: EnvFromSource represents + the source of a set of ConfigMaps + or Secrets + properties: + configMapRef: + description: The ConfigMap + to select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether + the ConfigMap must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + description: |- + Optional text to prepend to the name of each environment variable. + May consist of any printable ASCII characters except '='. + type: string + secretRef: + description: The Secret to + select from + properties: + name: + default: "" + description: |- + 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 + type: string + optional: + description: Specify whether + the Secret must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + description: |- + 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 and StatefulSets. + type: string + imagePullPolicy: + description: |- + 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 + type: string + lifecycle: + description: |- + Actions that the management system should take in response to container lifecycle events. + Cannot be updated. + properties: + postStart: description: |- - Periodic probe of container liveness. - Container will be restarted if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PostStart is called immediately after a container is created. If the handler fails, + the container is terminated and restarted according to its restart policy. + Other management of the container blocks until the hook completes. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies @@ -5329,34 +4991,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to @@ -5416,28 +5050,25 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents + a duration that the container + should sleep. + properties: + seconds: + description: Seconds + is the number of seconds + to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: @@ -5457,93 +5088,18 @@ spec: required: - port type: object - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: - description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer type: object - name: - description: |- - Name of the container specified as a DNS_LABEL. - Each container in a pod must have a unique name (DNS_LABEL). - Cannot be updated. - type: string - ports: - description: |- - 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. - 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. - items: - description: ContainerPort - represents a network port - in a single container. - properties: - containerPort: - description: |- - Number of port to expose on the pod's IP address. - This must be a valid port number, 0 < x < 65536. - format: int32 - type: integer - hostIP: - description: What host - IP to bind the external - port to. - type: string - hostPort: - description: |- - Number of port to expose on the host. - If specified, this must be a valid port number, 0 < x < 65536. - If HostNetwork is specified, this must match ContainerPort. - Most containers do not need this. - format: int32 - type: integer - name: - description: |- - If specified, this must be an IANA_SVC_NAME and unique within the pod. Each - named port in a pod must have a unique name. Name for the port that can be - referred to by services. - type: string - protocol: - default: TCP - description: |- - Protocol for port. Must be UDP, TCP, or SCTP. - Defaults to "TCP". - type: string - required: - - containerPort - type: object - type: array - x-kubernetes-list-map-keys: - - containerPort - - protocol - x-kubernetes-list-type: map - readinessProbe: + preStop: description: |- - Periodic probe of container service readiness. - Container will be removed from service endpoints if the probe fails. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + PreStop is called immediately before a container is terminated due to an + API request or management event such as liveness/startup probe failure, + preemption, resource contention, etc. The handler is not called if the + container crashes or exits. The Pod's termination grace period countdown begins before the + PreStop hook is executed. Regardless of the outcome of the handler, the + container will eventually terminate within the Pod's termination grace + period (unless delayed by finalizers). Other management of the container blocks until the hook completes + or until the termination grace period is reached. + More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks properties: exec: description: Exec specifies @@ -5562,34 +5118,6 @@ spec: type: array x-kubernetes-list-type: atomic type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object httpGet: description: HTTPGet specifies an HTTP GET request to @@ -5649,28 +5177,25 @@ spec: required: - port type: object - initialDelaySeconds: - description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: - description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: - description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer + sleep: + description: Sleep represents + a duration that the container + should sleep. + properties: + seconds: + description: Seconds + is the number of seconds + to sleep. + format: int64 + type: integer + required: + - seconds + type: object tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. + description: |- + Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + for backward compatibility. There is no validation of this field and + lifecycle hooks will fail at runtime when it is specified. properties: host: description: 'Optional: @@ -5690,795 +5215,1347 @@ spec: required: - port type: object - terminationGracePeriodSeconds: + type: object + stopSignal: + description: |- + StopSignal defines which signal will be sent to a container when it is being stopped. + If not specified, the default is defined by the container runtime in use. + StopSignal can only be set for Pods with a non-empty .spec.os.name + type: string + type: object + livenessProbe: + description: |- + Periodic probe of container liveness. + Container will be restarted if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. + format: int32 type: integer - timeoutSeconds: + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + name: + description: |- + Name of the container specified as a DNS_LABEL. + Each container in a pod must have a unique name (DNS_LABEL). + Cannot be updated. + type: string + ports: + description: |- + 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. + 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. + items: + description: ContainerPort represents + a network port in a single container. + properties: + containerPort: + description: |- + Number of port to expose on the pod's IP address. + This must be a valid port number, 0 < x < 65536. + format: int32 + type: integer + hostIP: + description: What host IP + to bind the external port + to. + type: string + hostPort: + description: |- + Number of port to expose on the host. + If specified, this must be a valid port number, 0 < x < 65536. + If HostNetwork is specified, this must match ContainerPort. + Most containers do not need this. + format: int32 + type: integer + name: + description: |- + If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + named port in a pod must have a unique name. Name for the port that can be + referred to by services. + type: string + protocol: + default: TCP + description: |- + Protocol for port. Must be UDP, TCP, or SCTP. + Defaults to "TCP". + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + description: |- + Periodic probe of container service readiness. + Container will be removed from service endpoints if the probe fails. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. format: int32 type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port + type: object + initialDelaySeconds: + description: |- + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: + description: |- + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: + description: |- + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port type: object - resizePolicy: + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + resizePolicy: + description: |- + Resources resize policy for the container. + This field cannot be set on ephemeral containers. + items: + description: ContainerResizePolicy + represents resource resize policy + for the container. + properties: + resourceName: + description: |- + Name of the resource to which this resource resize policy applies. + Supported values: cpu, memory. + type: string + restartPolicy: + description: |- + Restart policy to apply when specified resource is resized. + If not specified, it defaults to NotRequired. + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + description: |- + Compute Resources required by this container. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: description: |- - Resources resize policy for the container. - This field cannot be set on ephemeral containers. + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + This field depends on the + DynamicResourceAllocation feature gate. + + This field is immutable. It can only be set for containers. items: - description: ContainerResizePolicy - represents resource resize - policy for the container. + description: ResourceClaim + references one entry in + PodSpec.ResourceClaims. properties: - resourceName: + name: description: |- - Name of the resource to which this resource resize policy applies. - Supported values: cpu, memory. + 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. type: string - restartPolicy: + request: description: |- - Restart policy to apply when specified resource is resized. - If not specified, it defaults to NotRequired. + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. type: string required: - - resourceName - - restartPolicy + - name type: object type: array - x-kubernetes-list-type: atomic - resources: + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - Compute Resources required by this container. - Cannot be updated. + Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim - references one entry - in PodSpec.ResourceClaims. - properties: - name: - 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. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - 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/ - type: object type: object - restartPolicy: - description: |- - RestartPolicy defines the restart behavior of individual containers in a pod. - This overrides the pod-level restart policy. When this field is not specified, - the restart behavior is defined by the Pod's restart policy and the container type. - Additionally, 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. - type: string - restartPolicyRules: - description: |- - Represents a list of rules to be checked to determine if the - container should be restarted on exit. The rules are evaluated in - order. Once a rule matches a container exit condition, the remaining - rules are ignored. If no rule matches the container exit condition, - the Container-level restart policy determines the whether the container - is restarted or not. Constraints on the rules: - - At most 20 rules are allowed. - - Rules can have the same action. - - Identical rules are not forbidden in validations. - When rules are specified, container MUST set RestartPolicy explicitly - even it if matches the Pod's RestartPolicy. - items: - description: ContainerRestartRule - describes how a container - exit is handled. + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + 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/ + type: object + type: object + restartPolicy: + description: |- + RestartPolicy defines the restart behavior of individual containers in a pod. + This overrides the pod-level restart policy. When this field is not specified, + the restart behavior is defined by the Pod's restart policy and the container type. + Additionally, 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. + type: string + restartPolicyRules: + description: |- + Represents a list of rules to be checked to determine if the + container should be restarted on exit. The rules are evaluated in + order. Once a rule matches a container exit condition, the remaining + rules are ignored. If no rule matches the container exit condition, + the Container-level restart policy determines the whether the container + is restarted or not. Constraints on the rules: + - At most 20 rules are allowed. + - Rules can have the same action. + - Identical rules are not forbidden in validations. + When rules are specified, container MUST set RestartPolicy explicitly + even it if matches the Pod's RestartPolicy. + items: + description: ContainerRestartRule + describes how a container exit + is handled. + properties: + action: + description: |- + Specifies the action taken on a container exit if the requirements + are satisfied. The only possible value is "Restart" to restart the + container. + type: string + exitCodes: + description: Represents the + exit codes to check on container + exits. properties: - action: + operator: description: |- - Specifies the action taken on a container exit if the requirements - are satisfied. The only possible value is "Restart" to restart the - container. + Represents the relationship between the container exit code(s) and the + specified values. Possible values are: + - In: the requirement is satisfied if the container exit code is in the + set of specified values. + - NotIn: the requirement is satisfied if the container exit code is + not in the set of specified values. type: string - exitCodes: - description: Represents - the exit codes to check - on container exits. - properties: - operator: - description: |- - Represents the relationship between the container exit code(s) and the - specified values. Possible values are: - - In: the requirement is satisfied if the container exit code is in the - set of specified values. - - NotIn: the requirement is satisfied if the container exit code is - not in the set of specified values. - type: string - values: - description: |- - Specifies the set of values to check for container exit codes. - At most 255 elements are allowed. - items: - format: int32 - type: integer - type: array - x-kubernetes-list-type: set - required: - - operator - type: object + values: + description: |- + Specifies the set of values to check for container exit codes. + At most 255 elements are allowed. + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set required: - - action + - operator type: object - type: array - x-kubernetes-list-type: atomic - securityContext: + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + description: |- + SecurityContext defines the security options the container should be run with. + If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + properties: + allowPrivilegeEscalation: + description: |- + AllowPrivilegeEscalation controls whether a process can gain more + privileges than its parent process. This bool directly controls if + the no_new_privs flag will be set on the container process. + AllowPrivilegeEscalation is true always when the container is: + 1) run as Privileged + 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows. + type: boolean + appArmorProfile: description: |- - SecurityContext defines the security options the container should be run with. - If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + 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. properties: - allowPrivilegeEscalation: - description: |- - AllowPrivilegeEscalation controls whether a process can gain more - privileges than its parent process. This bool directly controls if - the no_new_privs flag will be set on the container process. - AllowPrivilegeEscalation is true always when the container is: - 1) run as Privileged - 2) has CAP_SYS_ADMIN - Note that this field cannot be set when spec.os.name is windows. - type: boolean - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - capabilities: - description: |- - The capabilities to add/drop when running containers. - Defaults to the default set of capabilities granted by the container runtime. - Note that this field cannot be set when spec.os.name is windows. - properties: - add: - description: Added capabilities - items: - description: Capability - represent POSIX - capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - drop: - description: Removed - capabilities - items: - description: Capability - represent POSIX - capabilities type - type: string - type: array - x-kubernetes-list-type: atomic - type: object - privileged: - description: |- - Run container in privileged mode. - Processes in privileged containers are essentially equivalent to root on the host. - Defaults to false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - procMount: + localhostProfile: description: |- - procMount denotes the type of proc mount to use for the containers. - The default value is Default which uses the container runtime defaults for - readonly paths and masked paths. - Note that this field cannot be set when spec.os.name is windows. + 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". type: string - readOnlyRootFilesystem: - description: |- - Whether this container has a read-only root filesystem. - Default is false. - Note that this field cannot be set when spec.os.name is windows. - type: boolean - runAsGroup: - description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: - description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: boolean - runAsUser: - description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxOptions: - description: |- - The SELinux context to be applied to the container. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is - SELinux level label - that applies to the - container. - type: string - role: - description: Role is - a SELinux role label - that applies to the - container. - type: string - type: - description: Type is - a SELinux type label - that applies to the - container. - type: string - user: - description: User is - a SELinux user label - that applies to the - container. - type: string - type: object - seccompProfile: - description: |- - The seccomp options to use by this container. If seccomp options are - provided at both the pod & container level, the container options - override the pod options. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: - description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. - type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: - - Localhost - 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. - type: string - required: - - type - type: object - windowsOptions: + type: description: |- - The Windows specific settings applied to all containers. - If unspecified, the options from the PodSecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the - GMSA credential spec - to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type type: object - startupProbe: - description: |- - StartupProbe indicates that the Pod has successfully initialized. - If specified, no other probes are executed until this completes successfully. - If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. - This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, - when it might take a long time to load data or warm a cache, than during steady-state operation. - This cannot be updated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + capabilities: + description: |- + The capabilities to add/drop when running containers. + Defaults to the default set of capabilities granted by the container runtime. + Note that this field cannot be set when spec.os.name is windows. properties: - exec: - description: Exec specifies - a command to execute in - the container. - properties: - command: - description: |- - Command is the command line to execute inside the container, the working directory for the - command is root ('/') in the container's filesystem. The command is simply exec'd, it is - not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use - a shell, you need to explicitly call out to that shell. - Exit status of 0 is treated as live/healthy and non-zero is unhealthy. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - failureThreshold: - description: |- - Minimum consecutive failures for the probe to be considered failed after having succeeded. - Defaults to 3. Minimum value is 1. - format: int32 - type: integer - grpc: - description: GRPC specifies - a GRPC HealthCheckRequest. - properties: - port: - description: Port number - of the gRPC service. - Number must be in - the range 1 to 65535. - format: int32 - type: integer - service: - default: "" - description: |- - Service is the name of the service to place in the gRPC HealthCheckRequest - (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). - - If this is not specified, the default behavior is defined by gRPC. - type: string - required: - - port - type: object - httpGet: - description: HTTPGet specifies - an HTTP GET request to - perform. - properties: - host: - description: |- - Host name to connect to, defaults to the pod IP. You probably want to set - "Host" in httpHeaders instead. - type: string - httpHeaders: - description: Custom - headers to set in - the request. HTTP - allows repeated headers. - items: - description: HTTPHeader - describes a custom - header to be used - in HTTP probes - properties: - name: - description: |- - The header field name. - This will be canonicalized upon output, so case-variant names will be understood as the same header. - type: string - value: - description: The - header field - value - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - path: - description: Path to - access on the HTTP - server. - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Name or number of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - scheme: - description: |- - Scheme to use for connecting to the host. - Defaults to HTTP. - type: string - required: - - port - type: object - initialDelaySeconds: + add: + description: Added capabilities + items: + description: Capability + represent POSIX capabilities + type + type: string + type: array + x-kubernetes-list-type: atomic + drop: + description: Removed capabilities + items: + description: Capability + represent POSIX capabilities + type + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + description: |- + Run container in privileged mode. + Processes in privileged containers are essentially equivalent to root on the host. + Defaults to false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + procMount: + description: |- + procMount denotes the type of proc mount to use for the containers. + The default value is Default which uses the container runtime defaults for + readonly paths and masked paths. + Note that this field cannot be set when spec.os.name is windows. + type: string + readOnlyRootFilesystem: + description: |- + Whether this container has a read-only root filesystem. + Default is false. + Note that this field cannot be set when spec.os.name is windows. + type: boolean + runAsGroup: + description: |- + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: + description: |- + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxOptions: + description: |- + The SELinux context to be applied to the container. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is windows. + properties: + level: + description: Level is SELinux + level label that applies + to the container. + type: string + role: + description: Role is a SELinux + role label that applies + to the container. + type: string + type: + description: Type is a SELinux + type label that applies + to the container. + type: string + user: + description: User is a SELinux + user label that applies + to the container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by this container. If seccomp options are + provided at both the pod & container level, the container options + override the pod options. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: description: |- - Number of seconds after the container has started before liveness probes are initiated. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes - format: int32 - type: integer - periodSeconds: + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: description: |- - How often (in seconds) to perform the probe. - Default to 10 seconds. Minimum value is 1. - format: int32 - type: integer - successThreshold: + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type + type: object + windowsOptions: + description: |- + The Windows specific settings applied to all containers. + If unspecified, the options from the PodSecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. + properties: + gmsaCredentialSpec: description: |- - Minimum consecutive successes for the probe to be considered successful after having failed. - Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. - format: int32 - type: integer - tcpSocket: - description: TCPSocket specifies - a connection to a TCP - port. - properties: - host: - description: 'Optional: - Host name to connect - to, defaults to the - pod IP.' - type: string - port: - anyOf: - - type: integer - - type: string - description: |- - Number or name of the port to access on the container. - Number must be in the range 1 to 65535. - Name must be an IANA_SVC_NAME. - x-kubernetes-int-or-string: true - required: - - port - type: object - terminationGracePeriodSeconds: + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. + type: string + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA + credential spec to use. + type: string + hostProcess: description: |- - Optional duration in seconds the pod needs to terminate gracefully upon probe failure. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this - value overrides the value provided by the pod spec. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. - Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. - format: int64 - type: integer - timeoutSeconds: + HostProcess determines if a container should be run as a 'Host 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. + type: boolean + runAsUserName: + description: |- + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: string + type: object + type: object + startupProbe: + description: |- + StartupProbe indicates that the Pod has successfully initialized. + If specified, no other probes are executed until this completes successfully. + If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + when it might take a long time to load data or warm a cache, than during steady-state operation. + This cannot be updated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + properties: + exec: + description: Exec specifies + a command to execute in the + container. + properties: + command: description: |- - Number of seconds after which the probe times out. - Defaults to 1 second. Minimum value is 1. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + Command is the command line to execute inside the container, the working directory for the + command is root ('/') in the container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + a shell, you need to explicitly call out to that shell. + Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + description: |- + Minimum consecutive failures for the probe to be considered failed after having succeeded. + Defaults to 3. Minimum value is 1. + format: int32 + type: integer + grpc: + description: GRPC specifies + a GRPC HealthCheckRequest. + properties: + port: + description: Port number + of the gRPC service. Number + must be in the range 1 + to 65535. format: int32 type: integer + service: + default: "" + description: |- + Service is the name of the service to place in the gRPC HealthCheckRequest + (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior is defined by gRPC. + type: string + required: + - port + type: object + httpGet: + description: HTTPGet specifies + an HTTP GET request to perform. + properties: + host: + description: |- + Host name to connect to, defaults to the pod IP. You probably want to set + "Host" in httpHeaders instead. + type: string + httpHeaders: + description: Custom headers + to set in the request. + HTTP allows repeated headers. + items: + description: HTTPHeader + describes a custom header + to be used in HTTP probes + properties: + name: + description: |- + The header field name. + This will be canonicalized upon output, so case-variant names will be understood as the same header. + type: string + value: + description: The header + field value + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + description: Path to access + on the HTTP server. + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Name or number of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + scheme: + description: |- + Scheme to use for connecting to the host. + Defaults to HTTP. + type: string + required: + - port type: object - stdin: + initialDelaySeconds: description: |- - Whether this container should allocate a buffer for stdin in the container runtime. If this - is not set, reads from stdin in the container will always result in EOF. - Default is false. - type: boolean - stdinOnce: - description: |- - Whether the container runtime should close the stdin channel after it has been opened by - a single attach. When stdin is true the stdin stream will remain open across multiple attach - sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the - first client attaches to stdin, and then remains open and accepts data until the client disconnects, - at which time stdin is closed and remains closed until the container is restarted. If this - flag is false, a container processes that reads from stdin will never receive an EOF. - Default is false - type: boolean - terminationMessagePath: - description: |- - Optional: Path at which the file to which the container's termination message - will be written is mounted into the container's filesystem. - Message written is intended to be brief final status, such as an assertion failure message. - Will be truncated by the node if greater than 4096 bytes. The total message length across - all containers will be limited to 12kb. - Defaults to /dev/termination-log. - Cannot be updated. - type: string - terminationMessagePolicy: - description: |- - Indicate how the termination message should be populated. File will use the contents of - terminationMessagePath to populate the container status message on both success and failure. - FallbackToLogsOnError 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. - type: string - tty: + Number of seconds after the container has started before liveness probes are initiated. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + periodSeconds: description: |- - Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. - Default is false. - type: boolean - volumeDevices: - description: volumeDevices is - the list of block devices - to be used by the container. - items: - description: volumeDevice - describes a mapping of a - raw block device within - a container. - properties: - devicePath: - description: devicePath - is the path inside of - the container that the - device will be mapped - to. - type: string - name: - description: name must - match the name of a - persistentVolumeClaim - in the pod - type: string - required: - - devicePath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - devicePath - x-kubernetes-list-type: map - volumeMounts: + How often (in seconds) to perform the probe. + Default to 10 seconds. Minimum value is 1. + format: int32 + type: integer + successThreshold: description: |- - Pod volumes to mount into the container's filesystem. - Cannot be updated. - items: - description: VolumeMount describes - a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - 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. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must - match the Name of a - Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. + Minimum consecutive successes for the probe to be considered successful after having failed. + Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + format: int32 + type: integer + tcpSocket: + description: TCPSocket specifies + a connection to a TCP port. + properties: + host: + description: 'Optional: + Host name to connect to, + defaults to the pod IP.' + type: string + port: + anyOf: + - type: integer + - type: string + description: |- + Number or name of the port to access on the container. + Number must be in the range 1 to 65535. + Name must be an IANA_SVC_NAME. + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + value overrides the value provided by the pod spec. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + format: int64 + type: integer + timeoutSeconds: + description: |- + Number of seconds after which the probe times out. + Defaults to 1 second. Minimum value is 1. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + format: int32 + type: integer + type: object + stdin: + description: |- + Whether this container should allocate a buffer for stdin in the container runtime. If this + is not set, reads from stdin in the container will always result in EOF. + Default is false. + type: boolean + stdinOnce: + description: |- + Whether the container runtime should close the stdin channel after it has been opened by + a single attach. When stdin is true the stdin stream will remain open across multiple attach + sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + first client attaches to stdin, and then remains open and accepts data until the client disconnects, + at which time stdin is closed and remains closed until the container is restarted. If this + flag is false, a container processes that reads from stdin will never receive an EOF. + Default is false + type: boolean + terminationMessagePath: + description: |- + Optional: Path at which the file to which the container's termination message + will be written is mounted into the container's filesystem. + Message written is intended to be brief final status, such as an assertion failure message. + Will be truncated by the node if greater than 4096 bytes. The total message length across + all containers will be limited to 12kb. + Defaults to /dev/termination-log. + Cannot be updated. + type: string + terminationMessagePolicy: + description: |- + Indicate how the termination message should be populated. File will use the contents of + terminationMessagePath to populate the container status message on both success and failure. + FallbackToLogsOnError 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. + type: string + tty: + description: |- + Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + Default is false. + type: boolean + volumeDevices: + description: volumeDevices is the + list of block devices to be used + by the container. + items: + description: volumeDevice describes + a mapping of a raw block device + within a container. + properties: + devicePath: + description: devicePath is + the path inside of the container + that the device will be + mapped to. + type: string + name: + description: name must match + the name of a persistentVolumeClaim + in the pod + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + description: |- + Pod volumes to mount into the container's filesystem. + Cannot be updated. + items: + description: VolumeMount describes + a mounting of a Volume within + a container. + properties: + mountPath: + description: |- + Path within the container at which the volume should be mounted. Must + not contain ':'. + type: string + mountPropagation: + 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. + When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + (which defaults to None). + type: string + name: + description: This must match + the Name of a Volume. + type: string + readOnly: + description: |- + Mounted read-only if true, read-write otherwise (false or unspecified). + Defaults to false. + type: boolean + recursiveReadOnly: + description: |- + RecursiveReadOnly specifies whether read-only mounts should be handled + recursively. - If ReadOnly is false, this field has no meaning and must be unspecified. + If ReadOnly is false, this field has no meaning and must be unspecified. - If 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. + If 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. - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). + If this field is set to IfPossible or Enabled, MountPropagation must be set to + None (or be unspecified, which defaults to None). - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - x-kubernetes-list-map-keys: - - mountPath - x-kubernetes-list-type: map - workingDir: - description: |- - Container's working directory. - If not specified, the container runtime's default will be used, which - might be configured in the container image. - Cannot be updated. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - nodeName: + If this field is not specified, it is treated as an equivalent of Disabled. + type: string + subPath: + description: |- + Path within the volume from which the container's volume should be mounted. + Defaults to "" (volume's root). + type: string + subPathExpr: + description: |- + Expanded path within the volume from which the container's volume should be mounted. + Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + Defaults to "" (volume's root). + SubPathExpr and SubPath are mutually exclusive. + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + description: |- + Container's working directory. + If not specified, the container runtime's default will be used, which + might be configured in the container image. + Cannot be updated. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + nodeName: + description: |- + NodeName indicates in which node this pod is scheduled. + If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. + Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. + This field should not be used to express a desire for the pod to be scheduled on a specific node. + https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + type: string + nodeSelector: + additionalProperties: + type: string + description: |- + NodeSelector is a selector which must be true for the pod to fit on a node. + Selector which must match a node's labels for the pod to be scheduled on that node. + More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + type: object + x-kubernetes-map-type: atomic + os: + description: |- + Specifies the OS of the containers in the pod. + Some pod and container fields are restricted if this is set. + + If the OS field is set to linux, the following fields must be unset: + -securityContext.windowsOptions + + If the OS field is set to windows, following fields must be unset: + - spec.hostPID + - spec.hostIPC + - spec.hostUsers + - spec.resources + - spec.securityContext.appArmorProfile + - spec.securityContext.seLinuxOptions + - spec.securityContext.seccompProfile + - spec.securityContext.fsGroup + - spec.securityContext.fsGroupChangePolicy + - spec.securityContext.sysctls + - spec.shareProcessNamespace + - spec.securityContext.runAsUser + - spec.securityContext.runAsGroup + - spec.securityContext.supplementalGroups + - spec.securityContext.supplementalGroupsPolicy + - spec.containers[*].securityContext.appArmorProfile + - spec.containers[*].securityContext.seLinuxOptions + - spec.containers[*].securityContext.seccompProfile + - spec.containers[*].securityContext.capabilities + - spec.containers[*].securityContext.readOnlyRootFilesystem + - spec.containers[*].securityContext.privileged + - spec.containers[*].securityContext.allowPrivilegeEscalation + - spec.containers[*].securityContext.procMount + - spec.containers[*].securityContext.runAsUser + - spec.containers[*].securityContext.runAsGroup + properties: + name: description: |- - NodeName indicates in which node this pod is scheduled. - If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. - Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. - This field should not be used to express a desire for the pod to be scheduled on a specific node. - https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + Name is the name of the operating system. The currently supported values are linux and windows. + Additional value may be defined in future and can be one of: + https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + Clients should expect to handle additional values and treat unrecognized values in this field as os: null type: string - nodeSelector: - additionalProperties: + required: + - name + type: object + overhead: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + This field will be autopopulated at admission time by the RuntimeClass admission controller. If + the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + The RuntimeClass admission controller will reject Pod create requests which have the overhead already + set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + type: object + preemptionPolicy: + description: |- + PreemptionPolicy is the Policy for preempting pods with lower priority. + One of Never, PreemptLowerPriority. + Defaults to PreemptLowerPriority if unset. + type: string + priority: + description: |- + The priority value. Various system components use this field to find the + priority of the pod. When Priority Admission Controller is enabled, it + prevents users from setting this field. The admission controller populates + this field from PriorityClassName. + The higher the value, the higher the priority. + format: int32 + type: integer + priorityClassName: + description: |- + If specified, indicates the pod's priority. "system-node-critical" and + "system-cluster-critical" are two special keywords which indicate the + highest priorities with the former being the highest priority. Any other + name must be defined by creating a PriorityClass object with that name. + If not specified, the pod priority will be default or zero if there is no + default. + type: string + readinessGates: + description: |- + If specified, all readiness gates will be evaluated for pod readiness. + A pod is ready when all its containers are ready AND + all conditions specified in the readiness gates have status equal to "True" + More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + items: + description: PodReadinessGate contains + the reference to a pod condition + properties: + conditionType: + description: ConditionType refers + to a condition in the pod's condition + list with matching type. type: string + required: + - conditionType + type: object + type: array + x-kubernetes-list-type: atomic + resourceClaims: + description: |- + ResourceClaims defines which ResourceClaims must be allocated + and reserved before the Pod is allowed to start. The resources + will be made available to those containers which consume them + by name. + + This is a stable field but requires that the + DynamicResourceAllocation feature gate is enabled. + + This field is immutable. + items: + description: |- + PodResourceClaim references exactly one ResourceClaim, either directly + or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim + for the pod. + + It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. + Containers that need access to the ResourceClaim reference it with this name. + + When the DRAWorkloadResourceClaims feature gate is enabled and this Pod + belongs to a PodGroup, a PodResourceClaim is matched to a + PodGroupResourceClaim if all of their fields are equal (Name, + ResourceClaimName, and ResourceClaimTemplateName). A matched claim references + a single ResourceClaim shared across all Pods in the PodGroup, reserved for + the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual + Pods. + properties: + name: + description: |- + Name uniquely identifies this resource claim inside the pod. + This must be a DNS_LABEL. + type: string + resourceClaimName: + description: |- + ResourceClaimName is the name of a ResourceClaim object in the same + namespace as this pod. + + Exactly one of ResourceClaimName and ResourceClaimTemplateName must + be set. + type: string + resourceClaimTemplateName: + description: |- + ResourceClaimTemplateName is the name of a ResourceClaimTemplate + object in the same namespace as this pod. + + The template will be used to create a new ResourceClaim, which will + be bound to this pod. When this pod is deleted, the ResourceClaim + will also be deleted. The pod name and resource name, along with a + generated component, will be used to form a unique name for the + ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + + When the DRAWorkloadResourceClaims feature gate is enabled and the pod + belongs to a PodGroup that defines a PodGroupResourceClaim with the same + Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the + ResourceClaim generated for the PodGroup. All pods in the group that + define an equivalent PodResourceClaim matching the + PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same + generated ResourceClaim. ResourceClaims generated for a PodGroup are + owned by the PodGroup and their lifecycles are tied to the PodGroup + instead of any individual pod. + + This field is immutable and no changes will be made to the + corresponding ResourceClaim by the control plane after creating the + ResourceClaim. + + Exactly one of ResourceClaimName and ResourceClaimTemplateName must + be set. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + resources: + description: |- + Resources is the total amount of CPU and Memory resources required by all + containers in the pod. It supports specifying Requests and Limits for + "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. + + This field enables fine-grained control over resource allocation for the + entire pod, allowing resource sharing among containers in a pod. + + This is an alpha field and requires enabling the PodLevelResources feature + gate. + properties: + claims: description: |- - NodeSelector is a selector which must be true for the pod to fit on a node. - Selector which must match a node's labels for the pod to be scheduled on that node. - More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ - type: object - x-kubernetes-map-type: atomic - os: - description: |- - Specifies the OS of the containers in the pod. - Some pod and container fields are restricted if this is set. + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. - If the OS field is set to linux, the following fields must be unset: - -securityContext.windowsOptions + This field depends on the + DynamicResourceAllocation feature gate. - If the OS field is set to windows, following fields must be unset: - - spec.hostPID - - spec.hostIPC - - spec.hostUsers - - spec.resources - - spec.securityContext.appArmorProfile - - spec.securityContext.seLinuxOptions - - spec.securityContext.seccompProfile - - spec.securityContext.fsGroup - - spec.securityContext.fsGroupChangePolicy - - spec.securityContext.sysctls - - spec.shareProcessNamespace - - spec.securityContext.runAsUser - - spec.securityContext.runAsGroup - - spec.securityContext.supplementalGroups - - spec.securityContext.supplementalGroupsPolicy - - spec.containers[*].securityContext.appArmorProfile - - spec.containers[*].securityContext.seLinuxOptions - - spec.containers[*].securityContext.seccompProfile - - spec.containers[*].securityContext.capabilities - - spec.containers[*].securityContext.readOnlyRootFilesystem - - spec.containers[*].securityContext.privileged - - spec.containers[*].securityContext.allowPrivilegeEscalation - - spec.containers[*].securityContext.procMount - - spec.containers[*].securityContext.runAsUser - - spec.containers[*].securityContext.runAsGroup - properties: - name: - description: |- - Name is the name of the operating system. The currently supported values are linux and windows. - Additional value may be defined in future and can be one of: - https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration - Clients should expect to handle additional values and treat unrecognized values in this field as os: null - type: string - required: + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references + one entry in PodSpec.ResourceClaims. + properties: + name: + 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. + type: string + request: + description: |- + Request is the name chosen for a request in the referenced claim. + If empty, everything from the claim is made available, otherwise + only the result of this request. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - overhead: + requests: additionalProperties: anyOf: - type: integer @@ -6486,1059 +6563,784 @@ spec: pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true description: |- - Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. - This field will be autopopulated at admission time by the RuntimeClass admission controller. If - the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. - The RuntimeClass admission controller will reject Pod create requests which have the overhead already - set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value - defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. - More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + 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/ type: object - preemptionPolicy: + type: object + restartPolicy: + description: |- + Restart policy for all containers within the pod. + One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. + Default to Always. + More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + type: string + runtimeClassName: + description: |- + RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + empty definition that uses the default runtime handler. + More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + type: string + schedulerName: + description: |- + If specified, the pod will be dispatched by specified scheduler. + If not specified, the pod will be dispatched by default scheduler. + type: string + schedulingGates: + description: |- + SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the + scheduler will not attempt to schedule the pod. + + SchedulingGates can only be set at pod creation time, and be removed only afterwards. + items: + description: PodSchedulingGate is associated + to a Pod to guard its scheduling. + properties: + name: + description: |- + Name of the scheduling gate. + Each scheduling gate must have a unique name field. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + schedulingGroup: + description: |- + SchedulingGroup provides a reference to the immediate scheduling runtime + grouping object that this Pod belongs to. + This field is used by the scheduler to identify the group and apply the + correct group scheduling policies. The association with a group also + impacts other lifecycle aspects of a Pod that are relevant in a wider context + of scheduling like preemption, resource attachment, etc. If not specified, + the Pod is treated as a single unit in all of these aspects. + The group object referenced by this field may not exist at the time the + Pod is created. + This field is immutable, but a group object with the same name may be + recreated with different policies. Doing this during pod scheduling + may result in the placement not conforming to the expected policies. + properties: + podGroupName: description: |- - PreemptionPolicy is the Policy for preempting pods with lower priority. - One of Never, PreemptLowerPriority. - Defaults to PreemptLowerPriority if unset. + PodGroupName specifies the name of the standalone PodGroup object + that represents the runtime instance of this group. + Must be a DNS subdomain. type: string - priority: + type: object + securityContext: + description: |- + SecurityContext holds pod-level security attributes and common container settings. + Optional: Defaults to empty. See type description for default values of each field. + properties: + 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. + properties: + 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". + type: string + type: + description: |- + type indicates which kind of AppArmor profile will be applied. + Valid options are: + Localhost - a profile pre-loaded on the node. + RuntimeDefault - the container runtime's default profile. + Unconfined - no AppArmor enforcement. + type: string + required: + - type + type: object + fsGroup: description: |- - The priority value. Various system components use this field to find the - priority of the pod. When Priority Admission Controller is enabled, it - prevents users from setting this field. The admission controller populates - this field from PriorityClassName. - The higher the value, the higher the priority. - format: int32 + A special supplemental group that applies to all containers in a pod. + Some volume types allow the Kubelet to change the ownership of that volume + to be owned by the pod: + + 1. The owning GID will be the FSGroup + 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + 3. The permission bits are OR'd with rw-rw---- + + If unset, the Kubelet will not modify the ownership and permissions of any volume. + Note that this field cannot be set when spec.os.name is windows. + format: int64 type: integer - priorityClassName: + fsGroupChangePolicy: description: |- - If specified, indicates the pod's priority. "system-node-critical" and - "system-cluster-critical" are two special keywords which indicate the - highest priorities with the former being the highest priority. Any other - name must be defined by creating a PriorityClass object with that name. - If not specified, the pod priority will be default or zero if there is no - default. + fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + before being exposed inside Pod. This field will only apply to + volume types which support fsGroup based ownership(and permissions). + It will have no effect on ephemeral volume types such as: secret, configmaps + and emptydir. + Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + Note that this field cannot be set when spec.os.name is windows. type: string - readinessGates: + runAsGroup: description: |- - If specified, all readiness gates will be evaluated for pod readiness. - A pod is ready when all its containers are ready AND - all conditions specified in the readiness gates have status equal to "True" - More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates - items: - description: PodReadinessGate contains - the reference to a pod condition - properties: - conditionType: - description: ConditionType refers - to a condition in the pod's - condition list with matching - type. - type: string - required: - - conditionType - type: object - type: array - x-kubernetes-list-type: atomic - resourceClaims: + The GID to run the entrypoint of the container process. + Uses runtime default if unset. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + runAsNonRoot: description: |- - ResourceClaims defines which ResourceClaims must be allocated - and reserved before the Pod is allowed to start. The resources - will be made available to those containers which consume them - by name. - - This is a stable field but requires that the - DynamicResourceAllocation feature gate is enabled. - - This field is immutable. - items: - description: |- - PodResourceClaim references exactly one ResourceClaim, either directly - or by naming a ResourceClaimTemplate which is then turned into a ResourceClaim - for the pod. - - It adds a name to it that uniquely identifies the ResourceClaim inside the Pod. - Containers that need access to the ResourceClaim reference it with this name. - - When the DRAWorkloadResourceClaims feature gate is enabled and this Pod - belongs to a PodGroup, a PodResourceClaim is matched to a - PodGroupResourceClaim if all of their fields are equal (Name, - ResourceClaimName, and ResourceClaimTemplateName). A matched claim references - a single ResourceClaim shared across all Pods in the PodGroup, reserved for - the PodGroup in ResourceClaimStatus.ReservedFor rather than for individual - Pods. - properties: - name: - description: |- - Name uniquely identifies this resource claim inside the pod. - This must be a DNS_LABEL. - type: string - resourceClaimName: - description: |- - ResourceClaimName is the name of a ResourceClaim object in the same - namespace as this pod. + Indicates that the container must run as a non-root user. + If true, the Kubelet will validate the image at runtime to ensure that it + does not run as UID 0 (root) and fail to start the container if it does. + If unset or false, no such validation will be performed. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. + type: boolean + runAsUser: + description: |- + The UID to run the entrypoint of the container process. + Defaults to user specified in image metadata if unspecified. + May also be set in SecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence + for that container. + Note that this field cannot be set when spec.os.name is windows. + format: int64 + type: integer + seLinuxChangePolicy: + description: |- + seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + Valid values are "MountOption" and "Recursive". - Exactly one of ResourceClaimName and ResourceClaimTemplateName must - be set. - type: string - resourceClaimTemplateName: - description: |- - ResourceClaimTemplateName is the name of a ResourceClaimTemplate - object in the same namespace as this pod. + "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. - The template will be used to create a new ResourceClaim, which will - be bound to this pod. When this pod is deleted, the ResourceClaim - will also be deleted. The pod name and resource name, along with a - generated component, will be used to form a unique name for the - ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + This requires all Pods that share the same volume to use the same SELinux label. + It is not possible to share the same volume among privileged and unprivileged Pods. + Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + CSIDriver instance. Other volumes are always re-labelled recursively. + "MountOption" value is allowed only when SELinuxMount feature gate is enabled. - When the DRAWorkloadResourceClaims feature gate is enabled and the pod - belongs to a PodGroup that defines a PodGroupResourceClaim with the same - Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the - ResourceClaim generated for the PodGroup. All pods in the group that - define an equivalent PodResourceClaim matching the - PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same - generated ResourceClaim. ResourceClaims generated for a PodGroup are - owned by the PodGroup and their lifecycles are tied to the PodGroup - instead of any individual pod. + If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + and "Recursive" for all other volumes. - This field is immutable and no changes will be made to the - corresponding ResourceClaim by the control plane after creating the - ResourceClaim. + This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. - Exactly one of ResourceClaimName and ResourceClaimTemplateName must - be set. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - resources: + All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + Note that this field cannot be set when spec.os.name is windows. + type: string + seLinuxOptions: description: |- - Resources is the total amount of CPU and Memory resources required by all - containers in the pod. It supports specifying Requests and Limits for - "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. - - This field enables fine-grained control over resource allocation for the - entire pod, allowing resource sharing among containers in a pod. - - This is an alpha field and requires enabling the PodLevelResources feature - gate. + The SELinux context to be applied to all containers. + If unspecified, the container runtime will allocate a random SELinux context for each + container. May also be set in SecurityContext. If set in + both SecurityContext and PodSecurityContext, the value specified in SecurityContext + takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references - one entry in PodSpec.ResourceClaims. - properties: - name: - 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. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + level: + description: Level is SELinux + level label that applies to + the container. + type: string + role: + description: Role is a SELinux + role label that applies to the + container. + type: string + type: + description: Type is a SELinux + type label that applies to the + container. + type: string + user: + description: User is a SELinux + user label that applies to the + container. + type: string + type: object + seccompProfile: + description: |- + The seccomp options to use by the containers in this pod. + Note that this field cannot be set when spec.os.name is windows. + properties: + localhostProfile: description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true + 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 be set if type is "Localhost". Must NOT be set for any other type. + type: string + type: 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/ - type: object + type indicates which kind of seccomp profile will be applied. + Valid options are: + + Localhost - 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. + type: string + required: + - type type: object - restartPolicy: + supplementalGroups: description: |- - Restart policy for all containers within the pod. - One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. - Default to Always. - More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy - type: string - runtimeClassName: - description: |- - RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used - to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. - If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an - empty definition that uses the default runtime handler. - More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class - type: string - schedulerName: + A list of groups applied to the first process run in each container, in + addition to the container's primary GID and fsGroup (if specified). If + the SupplementalGroupsPolicy feature is enabled, the + supplementalGroupsPolicy field determines whether these are in addition + to or instead of any group memberships defined in the container image. + If unspecified, no additional groups are added, though group memberships + defined in the container image may still be used, depending on the + supplementalGroupsPolicy field. + Note that this field cannot be set when spec.os.name is windows. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: description: |- - If specified, the pod will be dispatched by specified scheduler. - If not specified, the pod will be dispatched by default scheduler. + Defines how supplemental groups of the first container processes are calculated. + Valid values are "Merge" and "Strict". If not specified, "Merge" is used. + (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled + and the container runtime must implement support for this feature. + Note that this field cannot be set when spec.os.name is windows. type: string - schedulingGates: + sysctls: description: |- - SchedulingGates is an opaque list of values that if specified will block scheduling the pod. - If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the - scheduler will not attempt to schedule the pod. - - SchedulingGates can only be set at pod creation time, and be removed only afterwards. + Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + sysctls (by the container runtime) might fail to launch. + Note that this field cannot be set when spec.os.name is windows. items: - description: PodSchedulingGate is - associated to a Pod to guard its - scheduling. + description: Sysctl defines a kernel + parameter to be set properties: name: - description: |- - Name of the scheduling gate. - Each scheduling gate must have a unique name field. + description: Name of a property + to set + type: string + value: + description: Value of a property + to set type: string required: - name + - value type: object type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - schedulingGroup: + x-kubernetes-list-type: atomic + windowsOptions: description: |- - SchedulingGroup provides a reference to the immediate scheduling runtime - grouping object that this Pod belongs to. - This field is used by the scheduler to identify the group and apply the - correct group scheduling policies. The association with a group also - impacts other lifecycle aspects of a Pod that are relevant in a wider context - of scheduling like preemption, resource attachment, etc. If not specified, - the Pod is treated as a single unit in all of these aspects. - The group object referenced by this field may not exist at the time the - Pod is created. - This field is immutable, but a group object with the same name may be - recreated with different policies. Doing this during pod scheduling - may result in the placement not conforming to the expected policies. + The Windows specific settings applied to all containers. + If unspecified, the options within a container's SecurityContext will be used. + If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + Note that this field cannot be set when spec.os.name is linux. properties: - podGroupName: + gmsaCredentialSpec: description: |- - PodGroupName specifies the name of the standalone PodGroup object - that represents the runtime instance of this group. - Must be a DNS subdomain. + GMSACredentialSpec is where the GMSA admission webhook + (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + GMSA credential spec named by the GMSACredentialSpecName field. type: string - type: object - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - Optional: Defaults to empty. See type description for default values of each field. - properties: - 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. - properties: - 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". - type: string - type: - description: |- - type indicates which kind of AppArmor profile will be applied. - Valid options are: - Localhost - a profile pre-loaded on the node. - RuntimeDefault - the container runtime's default profile. - Unconfined - no AppArmor enforcement. - type: string - required: - - type - type: object - fsGroup: - description: |- - A special supplemental group that applies to all containers in a pod. - Some volume types allow the Kubelet to change the ownership of that volume - to be owned by the pod: - - 1. The owning GID will be the FSGroup - 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) - 3. The permission bits are OR'd with rw-rw---- - - If unset, the Kubelet will not modify the ownership and permissions of any volume. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - fsGroupChangePolicy: - description: |- - fsGroupChangePolicy defines behavior of changing ownership and permission of the volume - before being exposed inside Pod. This field will only apply to - volume types which support fsGroup based ownership(and permissions). - It will have no effect on ephemeral volume types such as: secret, configmaps - and emptydir. - Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. - Note that this field cannot be set when spec.os.name is windows. + gmsaCredentialSpecName: + description: GMSACredentialSpecName + is the name of the GMSA credential + spec to use. type: string - runAsGroup: - description: |- - The GID to run the entrypoint of the container process. - Uses runtime default if unset. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence - for that container. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - runAsNonRoot: + hostProcess: description: |- - Indicates that the container must run as a non-root user. - If true, the Kubelet will validate the image at runtime to ensure that it - does not run as UID 0 (root) and fail to start the container if it does. - If unset or false, no such validation will be performed. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. + HostProcess determines if a container should be run as a 'Host 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. type: boolean - runAsUser: - description: |- - The UID to run the entrypoint of the container process. - Defaults to user specified in image metadata if unspecified. - May also be set in SecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence - for that container. - Note that this field cannot be set when spec.os.name is windows. - format: int64 - type: integer - seLinuxChangePolicy: + runAsUserName: description: |- - seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. - It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. - Valid values are "MountOption" and "Recursive". - - "Recursive" means relabeling of all files on all Pod volumes by the container runtime. - This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. - - "MountOption" mounts all eligible Pod volumes with `-o context` mount option. - This requires all Pods that share the same volume to use the same SELinux label. - It is not possible to share the same volume among privileged and unprivileged Pods. - Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes - whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their - CSIDriver instance. Other volumes are always re-labelled recursively. - "MountOption" value is allowed only when SELinuxMount feature gate is enabled. - - If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. - If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes - and "Recursive" for all other volumes. - - This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. - - All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. - Note that this field cannot be set when spec.os.name is windows. + The UserName in Windows to run the entrypoint of the container process. + Defaults to the user specified in image metadata if unspecified. + May also be set in PodSecurityContext. If set in both SecurityContext and + PodSecurityContext, the value specified in SecurityContext takes precedence. type: string - seLinuxOptions: - description: |- - The SELinux context to be applied to all containers. - If unspecified, the container runtime will allocate a random SELinux context for each - container. May also be set in SecurityContext. If set in - both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. - Note that this field cannot be set when spec.os.name is windows. - properties: - level: - description: Level is SELinux - level label that applies - to the container. - type: string - role: - description: Role is a SELinux - role label that applies - to the container. - type: string - type: - description: Type is a SELinux - type label that applies - to the container. - type: string - user: - description: User is a SELinux - user label that applies - to the container. - type: string - type: object - seccompProfile: - description: |- - The seccomp options to use by the containers in this pod. - Note that this field cannot be set when spec.os.name is windows. - properties: - localhostProfile: + type: object + type: object + serviceAccount: + description: |- + DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. + Deprecated: Use serviceAccountName instead. + type: string + serviceAccountName: + description: |- + ServiceAccountName is the name of the ServiceAccount to use to run this pod. + More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + type: string + setHostnameAsFQDN: + description: |- + If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + If a pod does not have FQDN, this has no effect. + Default to false. + type: boolean + shareProcessNamespace: + description: |- + Share a single process namespace between all of the containers in a pod. + When this is set containers will be able to view and signal processes from other containers + in the same pod, and the first process in each container will not be assigned PID 1. + HostPID and ShareProcessNamespace cannot both be set. + Optional: Default to false. + type: boolean + subdomain: + description: |- + If specified, the fully qualified Pod hostname will be "...svc.". + If not specified, the pod will not have a domainname at all. + type: string + terminationGracePeriodSeconds: + description: |- + Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + Value must be non-negative integer. The value zero indicates stop immediately via + the kill signal (no opportunity to shut down). + If this value is nil, the default grace period will be used instead. + The grace period is the duration in seconds after the processes running in the pod are sent + a termination signal and the time when the processes are forcibly halted with a kill signal. + Set this value longer than the expected cleanup time for your process. + Defaults to 30 seconds. + format: int64 + type: integer + tolerations: + description: If specified, the pod's tolerations. + items: + description: |- + The pod this Toleration is attached to tolerates any taint that matches + the triple using the matching operator . + properties: + effect: + description: |- + Effect indicates the taint effect to match. Empty means match all taint effects. + When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + type: string + key: + description: |- + Key is the taint key that the toleration applies to. Empty means match all taint keys. + If the key is empty, operator must be Exists; this combination means to match all values and all keys. + type: string + operator: + description: |- + Operator represents a key's relationship to the value. + Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. + Exists is equivalent to wildcard for value, so that a pod can + tolerate all taints of a particular category. + Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + type: string + tolerationSeconds: + description: |- + TolerationSeconds represents the period of time the toleration (which must be + of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + it is not set, which means tolerate the taint forever (do not evict). Zero and + negative values will be treated as 0 (evict immediately) by the system. + format: int64 + type: integer + value: + description: |- + Value is the taint value the toleration matches to. + If the operator is Exists, the value should be empty, otherwise just a regular string. + type: string + type: object + type: array + x-kubernetes-list-type: atomic + topologySpreadConstraints: + description: |- + TopologySpreadConstraints describes how a group of pods ought to spread across topology + domains. Scheduler will schedule pods in a way which abides by the constraints. + All topologySpreadConstraints are ANDed. + items: + description: TopologySpreadConstraint + specifies how to spread matching pods + among the given topology. + properties: + labelSelector: + description: |- + LabelSelector is used to find matching pods. + Pods that match this label selector are counted to determine the number of pods + in their corresponding topology domain. + properties: + matchExpressions: + description: matchExpressions + is a list of label selector + requirements. The requirements + are ANDed. + items: description: |- - 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 be set if type is "Localhost". Must NOT be set for any other type. + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the + label key that the selector + applies to. + type: string + operator: + description: |- + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. + type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - type: - description: |- - type indicates which kind of seccomp profile will be applied. - Valid options are: + description: |- + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + description: |- + MatchLabelKeys is a set of pod label keys to select the pods over which + spreading will be calculated. The keys are used to lookup values from the + incoming pod labels, those key-value labels are ANDed with labelSelector + to select the group of existing pods over which spreading will be calculated + for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. + MatchLabelKeys cannot be set when LabelSelector isn't set. + Keys that don't exist in the incoming pod labels will + be ignored. A null or empty list means only match against labelSelector. - Localhost - 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. - type: string - required: - - type - type: object - supplementalGroups: - description: |- - A list of groups applied to the first process run in each container, in - addition to the container's primary GID and fsGroup (if specified). If - the SupplementalGroupsPolicy feature is enabled, the - supplementalGroupsPolicy field determines whether these are in addition - to or instead of any group memberships defined in the container image. - If unspecified, no additional groups are added, though group memberships - defined in the container image may still be used, depending on the - supplementalGroupsPolicy field. - Note that this field cannot be set when spec.os.name is windows. - items: - format: int64 - type: integer - type: array - x-kubernetes-list-type: atomic - supplementalGroupsPolicy: - description: |- - Defines how supplemental groups of the first container processes are calculated. - Valid values are "Merge" and "Strict". If not specified, "Merge" is used. - (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled - and the container runtime must implement support for this feature. - Note that this field cannot be set when spec.os.name is windows. + This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + items: type: string - sysctls: - description: |- - Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported - sysctls (by the container runtime) might fail to launch. - Note that this field cannot be set when spec.os.name is windows. - items: - description: Sysctl defines - a kernel parameter to be set - properties: - name: - description: Name of a property - to set - type: string - value: - description: Value of a - property to set - type: string - required: - - name - - value - type: object - type: array - x-kubernetes-list-type: atomic - windowsOptions: - description: |- - The Windows specific settings applied to all containers. - If unspecified, the options within a container's SecurityContext will be used. - If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. - Note that this field cannot be set when spec.os.name is linux. - properties: - gmsaCredentialSpec: - description: |- - GMSACredentialSpec is where the GMSA admission webhook - (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the - GMSA credential spec named by the GMSACredentialSpecName field. - type: string - gmsaCredentialSpecName: - description: GMSACredentialSpecName - is the name of the GMSA - credential spec to use. - type: string - hostProcess: - description: |- - HostProcess determines if a container should be run as a 'Host 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. - type: boolean - runAsUserName: - description: |- - The UserName in Windows to run the entrypoint of the container process. - Defaults to the user specified in image metadata if unspecified. - May also be set in PodSecurityContext. If set in both SecurityContext and - PodSecurityContext, the value specified in SecurityContext takes precedence. - type: string - type: object - type: object - serviceAccount: - description: |- - DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. - Deprecated: Use serviceAccountName instead. - type: string - serviceAccountName: - description: |- - ServiceAccountName is the name of the ServiceAccount to use to run this pod. - More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ - type: string - setHostnameAsFQDN: - description: |- - If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). - In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). - In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. - If a pod does not have FQDN, this has no effect. - Default to false. - type: boolean - shareProcessNamespace: - description: |- - Share a single process namespace between all of the containers in a pod. - When this is set containers will be able to view and signal processes from other containers - in the same pod, and the first process in each container will not be assigned PID 1. - HostPID and ShareProcessNamespace cannot both be set. - Optional: Default to false. - type: boolean - subdomain: - description: |- - If specified, the fully qualified Pod hostname will be "...svc.". - If not specified, the pod will not have a domainname at all. - type: string - terminationGracePeriodSeconds: - description: |- - Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. - Value must be non-negative integer. The value zero indicates stop immediately via - the kill signal (no opportunity to shut down). - If this value is nil, the default grace period will be used instead. - The grace period is the duration in seconds after the processes running in the pod are sent - a termination signal and the time when the processes are forcibly halted with a kill signal. - Set this value longer than the expected cleanup time for your process. - Defaults to 30 seconds. - format: int64 - type: integer - tolerations: - description: If specified, the pod's - tolerations. - items: + type: array + x-kubernetes-list-type: atomic + maxSkew: + description: |- + MaxSkew describes the degree to which pods may be unevenly distributed. + When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + between the number of matching pods in the target topology and the global minimum. + The global minimum is the minimum number of matching pods in an eligible domain + or zero if the number of eligible domains is less than MinDomains. + For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + labelSelector spread as 2/2/1: + In this case, the global minimum is 1. + | zone1 | zone2 | zone3 | + | P P | P P | P | + - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; + scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + violate MaxSkew(1). + - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + to topologies that satisfy it. + It's a required field. Default value is 1 and 0 is not allowed. + format: int32 + type: integer + minDomains: + description: |- + MinDomains indicates a minimum number of eligible domains. + When the number of eligible domains with matching topology keys is less than minDomains, + Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. + And when the number of eligible domains with matching topology keys equals or greater than minDomains, + this value has no effect on scheduling. + As a result, when the number of eligible domains is less than minDomains, + scheduler won't schedule more than maxSkew Pods to those domains. + If value is nil, the constraint behaves as if MinDomains is equal to 1. + Valid values are integers greater than 0. + When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + + For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same + labelSelector spread as 2/2/2: + | zone1 | zone2 | zone3 | + | P P | P P | P P | + The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. + In this situation, new pod with the same labelSelector cannot be scheduled, + because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, + it will violate MaxSkew. + format: int32 + type: integer + nodeAffinityPolicy: + description: |- + NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector + when calculating pod topology spread skew. Options are: + - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. + - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + + If this value is nil, the behavior is equivalent to the Honor policy. + type: string + nodeTaintsPolicy: + description: |- + NodeTaintsPolicy indicates how we will treat node taints when calculating + pod topology spread skew. Options are: + - Honor: nodes without taints, along with tainted nodes for which the incoming pod + has a toleration, are included. + - Ignore: node taints are ignored. All nodes are included. + + If this value is nil, the behavior is equivalent to the Ignore policy. + type: string + topologyKey: + description: |- + TopologyKey is the key of node labels. Nodes that have a label with this key + and identical values are considered to be in the same topology. + We consider each as a "bucket", and try to put balanced number + of pods into each bucket. + We define a domain as a particular instance of a topology. + Also, we define an eligible domain as a domain whose nodes meet the requirements of + nodeAffinityPolicy and nodeTaintsPolicy. + e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. + And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. + It's a required field. + type: string + whenUnsatisfiable: + description: |- + WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + the spread constraint. + - DoNotSchedule (default) tells the scheduler not to schedule it. + - ScheduleAnyway tells the scheduler to schedule the pod in any location, + but giving higher precedence to topologies that would help reduce the + skew. + A constraint is considered "Unsatisfiable" for an incoming pod + if and only if every possible node assignment for that pod would violate + "MaxSkew" on some topology. + For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + labelSelector spread as 3/1/1: + | zone1 | zone2 | zone3 | + | P P P | P | P | + If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + won't make it *more* imbalanced. + It's a required field. + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + x-kubernetes-list-map-keys: + - topologyKey + - whenUnsatisfiable + x-kubernetes-list-type: map + volumes: + description: |- + List of volumes that can be mounted by containers belonging to the pod. + More info: https://kubernetes.io/docs/concepts/storage/volumes + items: + description: Volume represents a named + volume in a pod that may be accessed + by any container in the pod. + properties: + awsElasticBlockStore: description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . + awsElasticBlockStore represents an AWS Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore properties: - effect: + fsType: description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + 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 type: string - key: + partition: + description: |- + 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). + format: int32 + type: integer + readOnly: + description: |- + readOnly value true will force the readOnly setting in VolumeMounts. + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + type: boolean + volumeID: description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. + volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + type: string + required: + - volumeID + type: object + azureDisk: + description: |- + azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + are redirected to the disk.csi.azure.com CSI driver. + properties: + cachingMode: + description: 'cachingMode is + the Host Caching mode: None, + Read Only, Read Write.' + type: string + diskName: + description: diskName is the + Name of the data disk in the + blob storage type: string - operator: + diskURI: + description: diskURI is the + URI of data disk in the blob + storage + type: string + fsType: + default: ext4 description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + 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. + type: string + kind: + description: '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' type: string - tolerationSeconds: + readOnly: + default: false description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: + readOnly Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + description: |- + azureFile represents an Azure File Service mount on the host and bind mount to the pod. + Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + are redirected to the file.csi.azure.com CSI driver. + properties: + readOnly: description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretName: + description: secretName is the name + of secret that contains Azure + Storage Account Name and Key + type: string + shareName: + description: shareName is the + azure share Name type: string + required: + - secretName + - shareName type: object - type: array - x-kubernetes-list-type: atomic - topologySpreadConstraints: - description: |- - TopologySpreadConstraints describes how a group of pods ought to spread across topology - domains. Scheduler will schedule pods in a way which abides by the constraints. - All topologySpreadConstraints are ANDed. - items: - description: TopologySpreadConstraint - specifies how to spread matching - pods among the given topology. + cephfs: + description: |- + cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. properties: - labelSelector: + monitors: description: |- - LabelSelector is used to find matching pods. - Pods that match this label selector are counted to determine the number of pods - in their corresponding topology domain. - properties: - matchExpressions: - description: matchExpressions - is a list of label selector - requirements. The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is - the label key that - the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - matchLabelKeys: - description: |- - MatchLabelKeys is a set of pod label keys to select the pods over which - spreading will be calculated. The keys are used to lookup values from the - incoming pod labels, those key-value labels are ANDed with labelSelector - to select the group of existing pods over which spreading will be calculated - for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. - MatchLabelKeys cannot be set when LabelSelector isn't set. - Keys that don't exist in the incoming pod labels will - be ignored. A null or empty list means only match against labelSelector. - - This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + monitors is Required: Monitors is a collection of Ceph monitors + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it items: type: string type: array x-kubernetes-list-type: atomic - maxSkew: - description: |- - MaxSkew describes the degree to which pods may be unevenly distributed. - When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference - between the number of matching pods in the target topology and the global minimum. - The global minimum is the minimum number of matching pods in an eligible domain - or zero if the number of eligible domains is less than MinDomains. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 2/2/1: - In this case, the global minimum is 1. - | zone1 | zone2 | zone3 | - | P P | P P | P | - - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; - scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) - violate MaxSkew(1). - - if MaxSkew is 2, incoming pod can be scheduled onto any zone. - When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence - to topologies that satisfy it. - It's a required field. Default value is 1 and 0 is not allowed. - format: int32 - type: integer - minDomains: - description: |- - MinDomains indicates a minimum number of eligible domains. - When the number of eligible domains with matching topology keys is less than minDomains, - Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. - And when the number of eligible domains with matching topology keys equals or greater than minDomains, - this value has no effect on scheduling. - As a result, when the number of eligible domains is less than minDomains, - scheduler won't schedule more than maxSkew Pods to those domains. - If value is nil, the constraint behaves as if MinDomains is equal to 1. - Valid values are integers greater than 0. - When value is not nil, WhenUnsatisfiable must be DoNotSchedule. - - For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same - labelSelector spread as 2/2/2: - | zone1 | zone2 | zone3 | - | P P | P P | P P | - The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. - In this situation, new pod with the same labelSelector cannot be scheduled, - because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, - it will violate MaxSkew. - format: int32 - type: integer - nodeAffinityPolicy: - description: |- - NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector - when calculating pod topology spread skew. Options are: - - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. - - If this value is nil, the behavior is equivalent to the Honor policy. + path: + description: 'path is Optional: + Used as the mounted root, + rather than the full Ceph + tree, default is /' type: string - nodeTaintsPolicy: + readOnly: description: |- - NodeTaintsPolicy indicates how we will treat node taints when calculating - pod topology spread skew. Options are: - - Honor: nodes without taints, along with tainted nodes for which the incoming pod - has a toleration, are included. - - Ignore: node taints are ignored. All nodes are included. - - If this value is nil, the behavior is equivalent to the Ignore policy. - type: string - topologyKey: - description: |- - TopologyKey is the key of node labels. Nodes that have a label with this key - and identical values are considered to be in the same topology. - We consider each as a "bucket", and try to put balanced number - of pods into each bucket. - We define a domain as a particular instance of a topology. - Also, we define an eligible domain as a domain whose nodes meet the requirements of - nodeAffinityPolicy and nodeTaintsPolicy. - e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. - And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. - It's a required field. - type: string - whenUnsatisfiable: - description: |- - WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy - the spread constraint. - - DoNotSchedule (default) tells the scheduler not to schedule it. - - ScheduleAnyway tells the scheduler to schedule the pod in any location, - but giving higher precedence to topologies that would help reduce the - skew. - A constraint is considered "Unsatisfiable" for an incoming pod - if and only if every possible node assignment for that pod would violate - "MaxSkew" on some topology. - For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same - labelSelector spread as 3/1/1: - | zone1 | zone2 | zone3 | - | P P P | P | P | - If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled - to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies - MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler - won't make it *more* imbalanced. - It's a required field. - type: string - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - type: array - x-kubernetes-list-map-keys: - - topologyKey - - whenUnsatisfiable - x-kubernetes-list-type: map - volumes: - description: |- - List of volumes that can be mounted by containers belonging to the pod. - More info: https://kubernetes.io/docs/concepts/storage/volumes - items: - description: Volume represents a - named volume in a pod that may - be accessed by any container in - the pod. - properties: - awsElasticBlockStore: + 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 + type: boolean + secretFile: description: |- - awsElasticBlockStore represents an AWS Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree - awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - properties: - fsType: - description: |- - 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 - type: string - partition: - description: |- - 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). - format: int32 - type: integer - readOnly: - description: |- - readOnly value true will force the readOnly setting in VolumeMounts. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: boolean - volumeID: - description: |- - volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore - type: string - required: - - volumeID - type: object - azureDisk: + 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 + type: string + secretRef: description: |- - azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. - Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type - are redirected to the disk.csi.azure.com CSI driver. + 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 properties: - cachingMode: - description: 'cachingMode - is the Host Caching mode: - None, Read Only, Read - Write.' - type: string - diskName: - description: diskName is - the Name of the data disk - in the blob storage - type: string - diskURI: - description: diskURI is - the URI of data disk in - the blob storage - type: string - fsType: - default: ext4 + name: + default: "" description: |- - 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. - type: string - kind: - description: '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' + 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 type: string - readOnly: - default: false - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - required: - - diskName - - diskURI type: object - azureFile: + x-kubernetes-map-type: atomic + user: description: |- - azureFile represents an Azure File Service mount on the host and bind mount to the pod. - Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type - are redirected to the file.csi.azure.com CSI driver. - properties: - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretName: - description: secretName - is the name of secret - that contains Azure Storage - Account Name and Key - type: string - shareName: - description: shareName is - the azure share Name - type: string - required: - - secretName - - shareName - type: object - cephfs: + 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 + type: string + required: + - monitors + type: object + cinder: + description: |- + cinder represents a cinder volume attached and mounted on kubelets host machine. + Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + are redirected to the cinder.csi.openstack.org CSI driver. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + properties: + fsType: description: |- - cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. - Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. - properties: - monitors: - description: |- - monitors is Required: Monitors is a collection of Ceph monitors - More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - path: - description: 'path is Optional: - Used as the mounted root, - rather than the full Ceph - tree, default is /' - type: string - readOnly: - description: |- - 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 - type: boolean - secretFile: - description: |- - 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 - type: string - secretRef: - description: |- - 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 - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - user: - description: |- - 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 - type: string - required: - - monitors - type: object - cinder: + 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 + type: string + readOnly: description: |- - cinder represents a cinder volume attached and mounted on kubelets host machine. - Deprecated: Cinder is deprecated. All operations for the in-tree cinder type - are redirected to the cinder.csi.openstack.org CSI driver. + 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 + type: boolean + secretRef: + description: |- + secretRef is optional: points to a secret object containing parameters used to connect + to OpenStack. properties: - fsType: - description: |- - 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 - type: string - readOnly: - description: |- - 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 - type: boolean - secretRef: - description: |- - secretRef is optional: points to a secret object containing parameters used to connect - to OpenStack. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - volumeID: - description: |- - volumeID used to identify the volume in cinder. - More info: https://examples.k8s.io/mysql-cinder-pd/README.md - type: string - required: - - volumeID - type: object - configMap: - description: configMap represents - a configMap that should populate - this volume - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - items: - description: |- - 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 keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string - key to a path within - a volume. - properties: - key: - description: key is - the key to project. - type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. - type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic name: default: "" description: |- @@ -7548,1920 +7350,1907 @@ spec: almost certainly wrong. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: optional specify - whether the ConfigMap - or its keys must be defined - type: boolean type: object x-kubernetes-map-type: atomic - csi: - description: csi (Container - Storage Interface) represents - ephemeral storage that is - handled by certain external - CSI drivers. + volumeID: + description: |- + volumeID used to identify the volume in cinder. + More info: https://examples.k8s.io/mysql-cinder-pd/README.md + type: string + required: + - volumeID + type: object + configMap: + description: configMap represents + a configMap that should populate + this volume + properties: + defaultMode: + description: |- + 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. + format: int32 + type: integer + items: + description: |- + 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 keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string + key to a path within a volume. + properties: + key: + description: key is the + key to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional specify + whether the ConfigMap or its + keys must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + description: csi (Container Storage + Interface) represents ephemeral + storage that is handled by certain + external CSI drivers. + properties: + driver: + description: |- + 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. + type: string + fsType: + description: |- + 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. + type: string + nodePublishSecretRef: + description: |- + 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 object contains more than one secret, all secret references are passed. properties: - driver: - description: |- - 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. - type: string - fsType: + name: + default: "" description: |- - 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. + 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 type: string - nodePublishSecretRef: - description: |- - 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 object contains more than one secret, all secret references are passed. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - readOnly: - description: |- - readOnly specifies a read-only configuration for the volume. - Defaults to false (read/write). - type: boolean - volumeAttributes: - additionalProperties: - type: string - description: |- - volumeAttributes stores driver-specific properties that are passed to the CSI - driver. Consult your driver's documentation for supported values. - type: object - required: - - driver type: object - downwardAPI: - description: downwardAPI represents - downward API about the pod - that should populate this - volume - properties: - defaultMode: - description: |- - Optional: mode bits to use on created files by default. Must be a - 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. - format: int32 - type: integer - items: - description: Items is a - list of downward API volume - file - items: - description: DownwardAPIVolumeFile - represents information - to create the file containing - the pod field + x-kubernetes-map-type: atomic + readOnly: + description: |- + readOnly specifies a read-only configuration for the volume. + Defaults to false (read/write). + type: boolean + volumeAttributes: + additionalProperties: + type: string + description: |- + volumeAttributes stores driver-specific properties that are passed to the CSI + driver. Consult your driver's documentation for supported values. + type: object + required: + - driver + type: object + downwardAPI: + description: downwardAPI represents + downward API about the pod that + should populate this volume + properties: + defaultMode: + description: |- + Optional: mode bits to use on created files by default. Must be a + 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. + format: int32 + type: integer + items: + description: Items is a list + of downward API volume file + items: + description: DownwardAPIVolumeFile + represents information to + create the file containing + the pod field + properties: + fieldRef: + description: 'Required: + Selects a field of the + pod: only annotations, + labels, name, namespace + and uid are supported.' properties: - fieldRef: - description: 'Required: - Selects a field - of the pod: only - annotations, labels, - name, namespace - and uid are supported.' - properties: - apiVersion: - description: Version - of the schema - the FieldPath - is written in - terms of, defaults - to "v1". - type: string - fieldPath: - description: Path - of the field - to select in - the specified - API version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - 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 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 be other mode bits set. - format: int32 - type: integer - path: + apiVersion: + description: Version + of the schema the + FieldPath is written + in terms of, defaults + to "v1". + type: string + fieldPath: + description: Path + of the field to + select in the specified + API version. + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + 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 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 be other mode bits set. + format: int32 + type: integer + path: + description: 'Required: + Path is the relative + path name of the file + to be created. Must + not be absolute or contain + the ''..'' path. Must + be utf-8 encoded. The + first item of the relative + path must not start + with ''..''' + type: string + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + properties: + containerName: + description: 'Container + name: required for + volumes, optional + for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output format + of the exposed resources, + defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: description: 'Required: - Path is the relative - path name of the - file to be created. - Must not be absolute - or contain the ''..'' - path. Must be utf-8 - encoded. The first - item of the relative - path must not start - with ''..''' + resource to select' type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container - name: required - for volumes, - optional for - env vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the output format - of the exposed - resources, defaults - to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic required: - - path + - resource type: object - type: array - x-kubernetes-list-type: atomic - type: object - emptyDir: + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + description: |- + emptyDir represents a temporary directory that shares a pod's lifetime. + More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + properties: + medium: description: |- - emptyDir represents a temporary directory that shares a pod's lifetime. + 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 - properties: - medium: - description: |- - 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 - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - 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 - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - ephemeral: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string description: |- - ephemeral represents a volume that is handled by a cluster storage driver. - The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, - and deleted when the pod is removed. + 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 + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + description: |- + ephemeral represents a volume that is handled by a cluster storage driver. + The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + and deleted when the pod is removed. - Use this if: - a) the volume is only needed while the pod runs, - b) features of normal volumes like restoring from snapshot or capacity - tracking are needed, - c) the storage driver is specified through a storage class, and - d) the storage driver supports dynamic volume provisioning through - a PersistentVolumeClaim (see EphemeralVolumeSource for more - information on the connection between this volume type - and PersistentVolumeClaim). + Use this if: + a) the volume is only needed while the pod runs, + b) features of normal volumes like restoring from snapshot or capacity + tracking are needed, + c) the storage driver is specified through a storage class, and + d) the storage driver supports dynamic volume provisioning through + a PersistentVolumeClaim (see EphemeralVolumeSource for more + information on the connection between this volume type + and PersistentVolumeClaim). - Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. + Use PersistentVolumeClaim or one of the vendor-specific + APIs for volumes that persist for longer than the lifecycle + of an individual pod. - Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to - be used that way - see the documentation of the driver for - more information. + Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + be used that way - see the documentation of the driver for + more information. - A pod can use both types of ephemeral volumes and - persistent volumes at the same time. - properties: - volumeClaimTemplate: - description: |- - Will be used to create a stand-alone PVC to provision the volume. - The pod in which this EphemeralVolumeSource is embedded will be the - owner of the PVC, i.e. the PVC will be deleted together with the - pod. The name of the PVC will be `-` where - `` is the name from the `PodSpec.Volumes` array - entry. Pod validation will reject the pod if the concatenated name - is not valid for a PVC (for example, too long). + A pod can use both types of ephemeral volumes and + persistent volumes at the same time. + properties: + volumeClaimTemplate: + description: |- + Will be used to create a stand-alone PVC to provision the volume. + The pod in which this EphemeralVolumeSource is embedded will be the + owner of the PVC, i.e. the PVC will be deleted together with the + pod. The name of the PVC will be `-` where + `` is the name from the `PodSpec.Volumes` array + entry. Pod validation will reject the pod if the concatenated name + is not valid for a PVC (for example, too long). - An existing PVC with that name that is not owned by the pod - will *not* be used for the pod to avoid using an unrelated - volume by mistake. Starting the pod is then blocked until - the unrelated PVC is removed. If such a pre-created PVC is - meant to be used by the pod, the PVC has to updated with an - owner reference to the pod once the pod exists. Normally - this should not be necessary, but it may be useful when - manually reconstructing a broken cluster. + An existing PVC with that name that is not owned by the pod + will *not* be used for the pod to avoid using an unrelated + volume by mistake. Starting the pod is then blocked until + the unrelated PVC is removed. If such a pre-created PVC is + meant to be used by the pod, the PVC has to updated with an + owner reference to the pod once the pod exists. Normally + this should not be necessary, but it may be useful when + manually reconstructing a broken cluster. - This field is read-only and no changes will be made by Kubernetes - to the PVC after it has been created. + This field is read-only and no changes will be made by Kubernetes + to the PVC after it has been created. - Required, must not be nil. + Required, must not be nil. + properties: + metadata: + description: |- + May contain labels and annotations that will be copied into the PVC + when creating it. No other fields are allowed and will be rejected during + validation. + properties: + annotations: + additionalProperties: + type: string + type: object + finalizers: + items: + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + namespace: + type: string + type: object + spec: + description: |- + The specification for the PersistentVolumeClaim. The entire content is + copied unchanged into the PVC that gets created from this + template. The same fields as in a PersistentVolumeClaim + are also valid here. properties: - metadata: + accessModes: + description: |- + accessModes contains the desired access modes the volume should have. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: description: |- - May contain labels and annotations that will be copied into the PVC - when creating it. No other fields are allowed and will be rejected during - validation. + 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. + properties: + 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. + type: string + kind: + description: Kind + is the type of + resource being + referenced + type: string + name: + description: Name + is the name of + resource being + referenced + type: string + required: + - kind + - name type: object - spec: + x-kubernetes-map-type: atomic + dataSourceRef: description: |- - The specification for the PersistentVolumeClaim. The entire content is - copied unchanged into the PVC that gets created from this - template. The same fields as in a PersistentVolumeClaim - are also valid here. + 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. + 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 + allows any non-core object, as well as PersistentVolumeClaim objects. + * While dataSource ignores disallowed values (dropping them), dataSourceRef + preserves all values, and generates an error if a disallowed value is + specified. + * While dataSource only allows local objects, dataSourceRef allows objects + in any namespaces. + (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. properties: - accessModes: + apiGroup: description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: + 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. + type: string + kind: + description: Kind + is the type of + resource being + referenced + type: string + name: + description: Name + is the name of + resource being + referenced + type: string + namespace: description: |- - 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. - properties: - 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. - type: string - kind: - description: Kind - is the type - of resource - being referenced - type: string - name: - description: Name - is the name - of resource - being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: + 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. + type: string + required: + - kind + - name + type: object + resources: + description: |- + resources represents the minimum resources the volume should have. + 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 the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - 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. - 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 - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (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. - properties: - 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. - type: string - kind: - description: Kind - is the type - of resource - being referenced - type: string - name: - description: Name - is the name - of resource - being referenced - type: string - namespace: - 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. - type: string - required: - - kind - - name + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - resources: + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true description: |- - resources represents the minimum resources the volume should have. - 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 the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - 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/ - type: object + 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/ type: object - selector: - description: selector - is a label query - over volumes to - consider for binding. - properties: - matchExpressions: - description: matchExpressions - is a list - of label selector - requirements. - The requirements - are ANDed. - items: + type: object + selector: + description: selector + is a label query over + volumes to consider + for binding. + properties: + matchExpressions: + description: matchExpressions + is a list of label + selector requirements. + The requirements + are ANDed. + items: + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key + is the label + key that + the selector + applies + to. + type: string + operator: description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is the - label - key - that - the - selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - 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 or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - 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/ - type: string - volumeMode: + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName - is the binding - reference to the - PersistentVolume - backing this claim. - type: string + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object - required: - - spec - type: object - type: object - fc: - description: fc represents a - Fibre Channel resource that - is attached to a kubelet's - host machine and then exposed - to the pod. - properties: - fsType: - description: |- - 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. - type: string - lun: - description: 'lun is Optional: - FC target lun number' - format: int32 - type: integer - readOnly: - description: |- - readOnly is Optional: Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - targetWWNs: - description: 'targetWWNs - is Optional: FC target - worldwide names (WWNs)' - items: - type: string - type: array - x-kubernetes-list-type: atomic - wwids: - description: |- - wwids Optional: FC volume world wide identifiers (wwids) - Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - flexVolume: - description: |- - flexVolume represents a generic volume resource that is - provisioned/attached using an exec based plugin. - Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. - properties: - driver: - description: driver is the - name of the driver to - use for this volume. - type: string - fsType: - description: |- - 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. - type: string - options: - additionalProperties: - type: string - description: 'options is - Optional: this field holds - extra command options - if any.' - type: object - readOnly: - description: |- - readOnly is Optional: defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - 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. - properties: - name: - default: "" + x-kubernetes-map-type: atomic + storageClassName: + description: |- + storageClassName is the name of the StorageClass required by the claim. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + type: string + 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 or nil value indicates that no + VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, + this field can be reset to its previous value (including nil) to cancel the modification. + 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/ + type: string + volumeMode: description: |- - 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 + volumeMode defines what type of volume is required by the claim. + Value of Filesystem is implied when not included in claim spec. + type: string + volumeName: + description: volumeName + is the binding reference + to the PersistentVolume + backing this claim. type: string type: object - x-kubernetes-map-type: atomic required: - - driver + - spec type: object - flocker: + type: object + fc: + description: fc represents a Fibre + Channel resource that is attached + to a kubelet's host machine and + then exposed to the pod. + properties: + fsType: description: |- - flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. - Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. - properties: - datasetName: - description: |- - datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker - should be considered as deprecated - type: string - datasetUUID: - description: datasetUUID - is the UUID of the dataset. - This is unique identifier - of a Flocker dataset - type: string - type: object - gcePersistentDisk: + 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. + type: string + lun: + description: 'lun is Optional: + FC target lun number' + format: int32 + type: integer + readOnly: description: |- - gcePersistentDisk represents a GCE Disk resource that is attached to a - kubelet's host machine and then exposed to the pod. - Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree - gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - properties: - fsType: - description: |- - 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 - type: string - partition: - description: |- - 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 - format: int32 - type: integer - pdName: - description: |- - 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 - type: string - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk - type: boolean - required: - - pdName - type: object - gitRepo: + readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + targetWWNs: + description: 'targetWWNs is + Optional: FC target worldwide + names (WWNs)' + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: description: |- - 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. - properties: - directory: - description: |- - 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. - type: string - repository: - description: repository - is the URL - type: string - revision: - description: revision is - the commit hash for the - specified revision. - type: string - required: - - repository + wwids Optional: FC volume world wide identifiers (wwids) + Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + description: |- + flexVolume represents a generic volume resource that is + provisioned/attached using an exec based plugin. + Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + properties: + driver: + description: driver is the name + of the driver to use for this + volume. + type: string + fsType: + description: |- + 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. + type: string + options: + additionalProperties: + type: string + description: 'options is Optional: + this field holds extra command + options if any.' type: object - glusterfs: + readOnly: description: |- - glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. - Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + readOnly is Optional: defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: |- + 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. properties: - endpoints: - description: endpoints is - the endpoint name that - details Glusterfs topology. - type: string - path: + name: + default: "" description: |- - path is the Glusterfs volume path. - More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + 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 type: string - readOnly: - description: |- - 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 - type: boolean - required: - - endpoints - - path type: object - hostPath: + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + description: |- + flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + properties: + datasetName: + description: |- + datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + should be considered as deprecated + type: string + datasetUUID: + description: datasetUUID is + the UUID of the dataset. This + is unique identifier of a + Flocker dataset + type: string + type: object + gcePersistentDisk: + description: |- + gcePersistentDisk represents a GCE Disk resource that is attached to a + kubelet's host machine and then exposed to the pod. + Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + properties: + fsType: + description: |- + 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 + type: string + partition: + description: |- + 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 + format: int32 + type: integer + pdName: + description: |- + 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 + type: string + readOnly: + description: |- + readOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + type: boolean + required: + - pdName + type: object + gitRepo: + description: |- + 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. + properties: + directory: + description: |- + 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. + type: string + repository: + description: repository is the + URL + type: string + revision: + description: revision is the + commit hash for the specified + revision. + type: string + required: + - repository + type: object + glusterfs: + description: |- + glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + properties: + endpoints: + description: endpoints is the + endpoint name that details + Glusterfs topology. + type: string + path: + description: |- + path is the Glusterfs volume path. + More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + type: string + readOnly: + description: |- + 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 + type: boolean + required: + - endpoints + - path + type: object + hostPath: + description: |- + 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: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + properties: + path: description: |- - 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. + 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 - properties: - path: - description: |- - 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 - type: string - type: - description: |- - type for HostPath Volume - Defaults to "" - More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath - type: string - required: - - path - type: object - image: + type: string + type: description: |- - image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. - The volume is resolved at pod startup depending on which PullPolicy value is provided: + type for HostPath Volume + Defaults to "" + More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + type: string + required: + - path + type: object + image: + description: |- + image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. + The volume is resolved at pod startup depending on which PullPolicy value is provided: - - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. - A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. - The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. - The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. - The volume will be mounted read-only (ro). - Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. - The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. - properties: - pullPolicy: - description: |- - Policy for pulling OCI objects. Possible values are: - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. - Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. - type: string - reference: - description: |- - Required: Image or artifact reference to be used. - Behaves in the same way as pod.spec.containers[*].image. - Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. - 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 and StatefulSets. - type: string - type: object - iscsi: + The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. + A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. + The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. + The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. + The volume will be mounted read-only (ro). + Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath) before 1.33. + The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. + properties: + pullPolicy: + description: |- + Policy for pulling OCI objects. Possible values are: + Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + type: string + reference: + description: |- + Required: Image or artifact reference to be used. + Behaves in the same way as pod.spec.containers[*].image. + Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. + 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 and StatefulSets. + type: string + type: object + iscsi: + description: |- + iscsi represents an ISCSI 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/#iscsi + properties: + chapAuthDiscovery: + description: chapAuthDiscovery + defines whether support iSCSI + Discovery CHAP authentication + type: boolean + chapAuthSession: + description: chapAuthSession + defines whether support iSCSI + Session CHAP authentication + type: boolean + fsType: + description: |- + 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 + type: string + initiatorName: + description: |- + initiatorName is the custom iSCSI Initiator Name. + If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + : will be created for the connection. + type: string + iqn: + description: iqn is the target + iSCSI Qualified Name. + type: string + iscsiInterface: + default: default + description: |- + iscsiInterface is the interface Name that uses an iSCSI transport. + Defaults to 'default' (tcp). + type: string + lun: + description: lun represents + iSCSI Target Lun number. + format: int32 + type: integer + portals: description: |- - iscsi represents an ISCSI 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/#iscsi + 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). + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + description: |- + readOnly here will force the ReadOnly setting in VolumeMounts. + Defaults to false. + type: boolean + secretRef: + description: secretRef is the + CHAP Secret for iSCSI target + and initiator authentication properties: - chapAuthDiscovery: - description: chapAuthDiscovery - defines whether support - iSCSI Discovery CHAP authentication - type: boolean - chapAuthSession: - description: chapAuthSession - defines whether support - iSCSI Session CHAP authentication - type: boolean - fsType: - description: |- - 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 - type: string - initiatorName: - description: |- - initiatorName is the custom iSCSI Initiator Name. - If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface - : will be created for the connection. - type: string - iqn: - description: iqn is the - target iSCSI Qualified - Name. - type: string - iscsiInterface: - default: default - description: |- - iscsiInterface is the interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). - type: string - lun: - description: lun represents - iSCSI Target Lun number. - format: int32 - type: integer - portals: - description: |- - 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). - items: - type: string - type: array - x-kubernetes-list-type: atomic - readOnly: - description: |- - readOnly here will force the ReadOnly setting in VolumeMounts. - Defaults to false. - type: boolean - secretRef: - description: secretRef is - the CHAP Secret for iSCSI - target and initiator authentication - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - targetPortal: + name: + default: "" description: |- - 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). + 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 type: string - required: - - iqn - - lun - - targetPortal type: object - name: + x-kubernetes-map-type: atomic + targetPortal: description: |- - 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 + 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). type: string - nfs: + required: + - iqn + - lun + - targetPortal + type: object + name: + description: |- + 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 + type: string + nfs: + description: |- + nfs represents an NFS mount on the host that shares a pod's lifetime + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + properties: + path: description: |- - nfs represents an NFS mount on the host that shares a pod's lifetime + path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - properties: - path: - description: |- - path that is exported by the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - readOnly: - description: |- - 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 - type: boolean - server: - description: |- - server is the hostname or IP address of the NFS server. - More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs - type: string - required: - - path - - server - type: object - persistentVolumeClaim: + type: string + readOnly: + description: |- + 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 + type: boolean + server: + description: |- + server is the hostname or IP address of the NFS server. + More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + description: |- + persistentVolumeClaimVolumeSource represents a reference to a + PersistentVolumeClaim in the same namespace. + More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + properties: + claimName: description: |- - persistentVolumeClaimVolumeSource represents a reference to 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 - properties: - claimName: - description: |- - 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 - type: string - readOnly: - description: |- - readOnly Will force the ReadOnly setting in VolumeMounts. - Default false. - type: boolean - required: - - claimName - type: object - photonPersistentDisk: + type: string + readOnly: description: |- - photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. - Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. - properties: - fsType: - description: |- - 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. - type: string - pdID: - description: pdID is the - ID that identifies Photon - Controller persistent - disk - type: string - required: - - pdID - type: object - portworxVolume: + readOnly Will force the ReadOnly setting in VolumeMounts. + Default false. + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + description: |- + photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. + properties: + fsType: + description: |- + 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. + type: string + pdID: + description: pdID is the ID + that identifies Photon Controller + persistent disk + type: string + required: + - pdID + type: object + portworxVolume: + description: |- + portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + are redirected to the pxd.portworx.com CSI driver. + properties: + fsType: + description: |- + 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. + type: string + readOnly: + description: |- + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + volumeID: + description: volumeID uniquely + identifies a Portworx volume + type: string + required: + - volumeID + type: object + projected: + description: projected items for + all in one resources secrets, + configmaps, and downward API + properties: + defaultMode: + description: |- + 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. + format: int32 + type: integer + sources: description: |- - portworxVolume represents a portworx volume attached and mounted on kubelets host machine. - Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type - are redirected to the pxd.portworx.com CSI driver. - properties: - fsType: - description: |- - 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. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - volumeID: - description: volumeID uniquely - identifies a Portworx - volume - type: string - required: - - volumeID - type: object - projected: - description: projected items - for all in one resources secrets, - configmaps, and downward API - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - sources: - description: |- - sources is the list of volume projections. Each entry in this list - handles one source. - items: + sources is the list of volume projections. Each entry in this list + handles one source. + items: + description: |- + Projection that may be projected along with other supported volume types. + Exactly one of these fields must be set. + properties: + clusterTrustBundle: description: |- - Projection that may be projected along with other supported volume types. - Exactly one of these fields must be set. - properties: - clusterTrustBundle: - description: |- - ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field - of ClusterTrustBundle objects in an auto-updating file. + ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field + of ClusterTrustBundle objects in an auto-updating file. - Alpha, gated by the ClusterTrustBundleProjection feature gate. + Alpha, gated by the ClusterTrustBundleProjection feature gate. - ClusterTrustBundle objects can either be selected by name, or by the - combination of signer name and a label selector. + ClusterTrustBundle objects can either be selected by name, or by the + combination of signer name and a label selector. - Kubelet 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. - properties: - labelSelector: - description: |- - 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". - properties: - matchExpressions: - description: matchExpressions - is a list - of label - selector - requirements. - The requirements - are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key - is - the - label - key - that - the - selector - applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - name: - description: |- - Select a single ClusterTrustBundle by object name. Mutually-exclusive - with signerName and labelSelector. - type: string - optional: - description: |- - 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. - type: boolean - path: - description: Relative - path from the - volume root - to write the - bundle. - type: string - signerName: - description: |- - Select all ClusterTrustBundles that match this signer name. - Mutually-exclusive with name. The contents of all selected - ClusterTrustBundles will be unified and deduplicated. - type: string - required: - - path - type: object - configMap: - description: configMap - information about - the configMap data - to project + Kubelet 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. + properties: + labelSelector: + description: |- + 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". properties: - items: - description: |- - 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 keys will not be - present. If a key is specified which is not present in the ConfigMap, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. + matchExpressions: + description: matchExpressions + is a list of + label selector + requirements. + The requirements + are ANDed. items: - description: Maps - a string key - to a path - within a volume. + description: |- + A label selector requirement is a selector that contains values, a key, and an operator that + relates the key and values. properties: key: description: key is the - key to - project. + label + key that + the selector + applies + to. type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: + operator: description: |- - 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 '..'. + operator represents a key's relationship to a set of values. + Valid operators are In, NotIn, Exists and DoesNotExist. type: string + values: + description: |- + values is an array of string values. If the operator is In or NotIn, + the values array must be non-empty. If the operator is Exists or DoesNotExist, + the values array must be empty. This array is replaced during a strategic + merge patch. + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - key - - path + - operator type: object type: array x-kubernetes-list-type: atomic - name: - default: "" + matchLabels: + additionalProperties: + type: string description: |- - 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 - type: string - optional: - description: optional - specify whether - the ConfigMap - or its keys - must be defined - type: boolean + matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + map is equivalent to an element of matchExpressions, whose key field is "key", the + operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object type: object x-kubernetes-map-type: atomic - downwardAPI: - description: downwardAPI - information about - the downwardAPI - data to project - properties: - items: - description: Items - is a list of - DownwardAPIVolume - file - items: - description: DownwardAPIVolumeFile - represents - information - to create - the file containing - the pod field + name: + description: |- + Select a single ClusterTrustBundle by object name. Mutually-exclusive + with signerName and labelSelector. + type: string + optional: + description: |- + 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. + type: boolean + path: + description: Relative + path from the volume + root to write the + bundle. + type: string + signerName: + description: |- + Select all ClusterTrustBundles that match this signer name. + Mutually-exclusive with name. The contents of all selected + ClusterTrustBundles will be unified and deduplicated. + type: string + required: + - path + type: object + configMap: + description: configMap + information about the + configMap data to project + properties: + items: + description: |- + 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 keys will not be + present. If a key is specified which is not present in the ConfigMap, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps + a string key to + a path within + a volume. + properties: + key: + description: key + is the key + to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional + specify whether + the ConfigMap or + its keys must be + defined + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + description: downwardAPI + information about the + downwardAPI data to + project + properties: + items: + description: Items + is a list of DownwardAPIVolume + file + items: + description: DownwardAPIVolumeFile + represents information + to create the + file containing + the pod field + properties: + fieldRef: + description: 'Required: + Selects a + field of the + pod: only + annotations, + labels, name, + namespace + and uid are + supported.' properties: - fieldRef: - description: 'Required: - Selects - a field + apiVersion: + description: Version of the - pod: only - annotations, - labels, - name, - namespace - and uid - are supported.' - properties: - apiVersion: - description: Version - of - the - schema - the - FieldPath - is - written - in - terms - of, - defaults - to - "v1". - type: string - fieldPath: - description: Path - of - the - field - to - select - in - the - specified - API - version. - type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - mode: - 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 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 be other mode bits set. - format: int32 - type: integer - path: - description: 'Required: - Path is the - relative - path name + schema + the FieldPath + is written + in terms + of, defaults + to "v1". + type: string + fieldPath: + description: Path of the - file to - be created. - Must not - be absolute - or contain - the ''..'' - path. - Must be - utf-8 - encoded. - The first - item of - the relative - path must - not start - with ''..''' + field + to select + in the + specified + API version. type: string - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. - properties: - containerName: - description: 'Container - name: - required - for - volumes, - optional - for - env - vars' - type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies - the - output - format - of - the - exposed - resources, - defaults - to - "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: - resource - to - select' - type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic required: - - path + - fieldPath type: object - type: array - x-kubernetes-list-type: atomic - type: object - podCertificate: - description: |- - Projects an auto-rotating credential bundle (private key and certificate - chain) that the pod can use either as a TLS client or server. - - Kubelet generates a private key and uses it to send a - PodCertificateRequest to the named signer. Once the signer approves the - request and issues a certificate chain, Kubelet writes the key and - certificate chain to the pod filesystem. The pod does not start until - certificates have been issued for each podCertificate projected volume - source in its spec. - - Kubelet will begin trying to rotate the certificate at the time indicated - by the signer using the PodCertificateRequest.Status.BeginRefreshAt - timestamp. - - Kubelet can write a single file, indicated by the credentialBundlePath - field, or separate files, indicated by the keyPath and - certificateChainPath fields. - - The credential bundle is a single file in PEM format. The first PEM - entry is the private key (in PKCS#8 format), and the remaining PEM - entries are the certificate chain issued by the signer (typically, - signers will return their certificate chain in leaf-to-root order). - - Prefer using the credential bundle format, since your application code - can read it atomically. If you use keyPath and certificateChainPath, - your application must make two separate file reads. If these coincide - with a certificate rotation, it is possible that the private key and leaf - certificate you read may not correspond to each other. Your application - will need to check for this condition, and re-read until they are - consistent. - - The named signer controls chooses the format of the certificate it - issues; consult the signer implementation's documentation to learn how to - use the certificates it issues. - properties: - certificateChainPath: - description: |- - Write the certificate chain at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - credentialBundlePath: - description: |- - Write the credential bundle at this path in the projected volume. - - The credential bundle is a single file that contains multiple PEM blocks. - The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private - key. - - The remaining blocks are CERTIFICATE blocks, containing the issued - certificate chain from the signer (leaf and any intermediates). - - Using credentialBundlePath lets your Pod's application code make a single - atomic read that retrieves a consistent key and certificate chain. If you - project them to separate files, your application code will need to - additionally check that the leaf certificate was issued to the key. - type: string - keyPath: - description: |- - Write the key at this path in the projected volume. - - Most applications should use credentialBundlePath. When using keyPath - and certificateChainPath, your application needs to check that the key - and leaf certificate are consistent, because it is possible to read the - files mid-rotation. - type: string - keyType: - description: |- - The type of keypair Kubelet will generate for the pod. - - Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", - "ECDSAP521", and "ED25519". - type: string - maxExpirationSeconds: - description: |- - maxExpirationSeconds is the maximum lifetime permitted for the - certificate. - - Kubelet copies this value verbatim into the PodCertificateRequests it - generates for this projection. - - If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver - will reject values shorter than 3600 (1 hour). The maximum allowable - value is 7862400 (91 days). - - The signer implementation is then free to issue a certificate with any - lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 - seconds (1 hour). This constraint is enforced by kube-apiserver. - `kubernetes.io` signers will never issue certificates with a lifetime - longer than 24 hours. - format: int32 - type: integer - signerName: - description: Kubelet's - generated CSRs - will be addressed - to this signer. - type: string - userAnnotations: - additionalProperties: + x-kubernetes-map-type: atomic + mode: + 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 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 be other mode bits set. + format: int32 + type: integer + path: + description: 'Required: + Path is the + relative path + name of the + file to be + created. Must + not be absolute + or contain + the ''..'' + path. Must + be utf-8 encoded. + The first + item of the + relative path + must not start + with ''..''' type: string - description: |- - userAnnotations allow pod authors to pass additional information to - the signer implementation. Kubernetes does not restrict or validate this - metadata in any way. - - These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of - the PodCertificateRequest objects that Kubelet creates. - - Entries are subject to the same validation as object metadata annotations, - with the addition that all keys must be domain-prefixed. No restrictions - are placed on values, except an overall size limitation on the entire field. - - Signers should document the keys and values they support. Signers should - deny requests that contain keys they do not recognize. - type: object - required: - - keyType - - signerName - type: object - secret: - description: secret - information about - the secret data - to project - properties: - items: - description: |- - 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 will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps - a string key - to a path - within a volume. + resourceFieldRef: + description: |- + Selects a resource of the container: only resources limits and requests + (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. properties: - key: - description: key - is the - key to - project. + containerName: + description: 'Container + name: + required + for volumes, + optional + for env + vars' type: string - mode: - description: |- - 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 be other mode bits set. - format: int32 - type: integer - path: - description: |- - 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 '..'. + divisor: + anyOf: + - type: integer + - type: string + description: Specifies + the output + format + of the + exposed + resources, + defaults + to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: + resource + to select' type: string - required: - - key - - path - type: object - type: array - x-kubernetes-list-type: atomic - name: - default: "" - description: |- - 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 - type: string - optional: - description: optional - field specify - whether the - Secret or its - key must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - serviceAccountToken: - description: serviceAccountToken - is information about - the serviceAccountToken - data to project - properties: - audience: - description: |- - 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. - type: string - expirationSeconds: - description: |- - 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 percent of - its time to live or if the token is older than 24 hours.Defaults to 1 hour - and must be at least 10 minutes. - format: int64 - type: integer - path: - description: |- - path is the path relative to the mount point of the file to project the - token into. - type: string - required: - - path - type: object - type: object - type: array - x-kubernetes-list-type: atomic - type: object - quobyte: - description: |- - quobyte represents a Quobyte mount on the host that shares a pod's lifetime. - Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. - properties: - group: - description: |- - group to map volume access to - Default is no group - type: string - readOnly: - description: |- - readOnly here will force the Quobyte volume to be mounted with read-only permissions. - Defaults to false. - type: boolean - registry: - description: |- - 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 - type: string - tenant: - description: |- - tenant owning the given Quobyte volume in the Backend - Used with dynamically provisioned Quobyte volumes, value is set by the plugin - type: string - user: - description: |- - user to map volume access to - Defaults to serivceaccount user - type: string - volume: - description: volume is a - string that references - an already created Quobyte - volume by name. - type: string - required: - - registry - - volume - type: object - rbd: - description: |- - rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. - Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. - properties: - fsType: - description: |- - 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 - type: string - image: - description: |- - image is the rados image name. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - keyring: - default: /etc/ceph/keyring - description: |- - 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 - type: string - monitors: - description: |- - monitors is a collection of Ceph monitors. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - items: - type: string - type: array - x-kubernetes-list-type: atomic - pool: - default: rbd - description: |- - pool is the rados pool name. - Default is rbd. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - readOnly: - description: |- - 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 - type: boolean - secretRef: - description: |- - 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 - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - user: - default: admin - description: |- - user is the rados user name. - Default is admin. - More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it - type: string - required: - - image - - monitors - type: object - scaleIO: - description: |- - scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. - Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. - properties: - fsType: - default: xfs - description: |- - 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". - type: string - gateway: - description: gateway is - the host address of the - ScaleIO API Gateway. - type: string - protectionDomain: - description: protectionDomain - is the name of the ScaleIO - Protection Domain for - the configured storage. - type: string - readOnly: - description: |- - readOnly Defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef references to the secret for ScaleIO user and other - sensitive information. If this is not provided, Login operation will fail. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - sslEnabled: - description: sslEnabled - Flag enable/disable SSL - communication with Gateway, - default false - type: boolean - storageMode: - default: ThinProvisioned - description: |- - storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. - Default is ThinProvisioned. - type: string - storagePool: - description: storagePool - is the ScaleIO Storage - Pool associated with the - protection domain. - type: string - system: - description: system is the - name of the storage system - as configured in ScaleIO. - type: string - volumeName: - description: |- - volumeName is the name of a volume already created in the ScaleIO system - that is associated with this volume source. - type: string - required: - - gateway - - secretRef - - system - type: object - secret: - description: |- - secret represents a secret that should populate this volume. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - properties: - defaultMode: - description: |- - 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. - format: int32 - type: integer - items: - description: |- - 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 will not be - present. If a key is specified which is not present in the Secret, - the volume setup will error unless it is marked optional. Paths must be - relative and may not contain the '..' path or start with '..'. - items: - description: Maps a string - key to a path within - a volume. + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + description: |- + Projects an auto-rotating credential bundle (private key and certificate + chain) that the pod can use either as a TLS client or server. + + Kubelet generates a private key and uses it to send a + PodCertificateRequest to the named signer. Once the signer approves the + request and issues a certificate chain, Kubelet writes the key and + certificate chain to the pod filesystem. The pod does not start until + certificates have been issued for each podCertificate projected volume + source in its spec. + + Kubelet will begin trying to rotate the certificate at the time indicated + by the signer using the PodCertificateRequest.Status.BeginRefreshAt + timestamp. + + Kubelet can write a single file, indicated by the credentialBundlePath + field, or separate files, indicated by the keyPath and + certificateChainPath fields. + + The credential bundle is a single file in PEM format. The first PEM + entry is the private key (in PKCS#8 format), and the remaining PEM + entries are the certificate chain issued by the signer (typically, + signers will return their certificate chain in leaf-to-root order). + + Prefer using the credential bundle format, since your application code + can read it atomically. If you use keyPath and certificateChainPath, + your application must make two separate file reads. If these coincide + with a certificate rotation, it is possible that the private key and leaf + certificate you read may not correspond to each other. Your application + will need to check for this condition, and re-read until they are + consistent. + + The named signer controls chooses the format of the certificate it + issues; consult the signer implementation's documentation to learn how to + use the certificates it issues. properties: - key: - description: key is - the key to project. + certificateChainPath: + description: |- + Write the certificate chain at this path in the projected volume. + + Most applications should use credentialBundlePath. When using keyPath + and certificateChainPath, your application needs to check that the key + and leaf certificate are consistent, because it is possible to read the + files mid-rotation. + type: string + credentialBundlePath: + description: |- + Write the credential bundle at this path in the projected volume. + + The credential bundle is a single file that contains multiple PEM blocks. + The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private + key. + + The remaining blocks are CERTIFICATE blocks, containing the issued + certificate chain from the signer (leaf and any intermediates). + + Using credentialBundlePath lets your Pod's application code make a single + atomic read that retrieves a consistent key and certificate chain. If you + project them to separate files, your application code will need to + additionally check that the leaf certificate was issued to the key. + type: string + keyPath: + description: |- + Write the key at this path in the projected volume. + + Most applications should use credentialBundlePath. When using keyPath + and certificateChainPath, your application needs to check that the key + and leaf certificate are consistent, because it is possible to read the + files mid-rotation. + type: string + keyType: + description: |- + The type of keypair Kubelet will generate for the pod. + + Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", + "ECDSAP521", and "ED25519". type: string - mode: + maxExpirationSeconds: description: |- - 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 be other mode bits set. + maxExpirationSeconds is the maximum lifetime permitted for the + certificate. + + Kubelet copies this value verbatim into the PodCertificateRequests it + generates for this projection. + + If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + will reject values shorter than 3600 (1 hour). The maximum allowable + value is 7862400 (91 days). + + The signer implementation is then free to issue a certificate with any + lifetime *shorter* than MaxExpirationSeconds, but no shorter than 3600 + seconds (1 hour). This constraint is enforced by kube-apiserver. + `kubernetes.io` signers will never issue certificates with a lifetime + longer than 24 hours. format: int32 type: integer + signerName: + description: Kubelet's + generated CSRs will + be addressed to + this signer. + type: string + userAnnotations: + additionalProperties: + type: string + description: |- + userAnnotations allow pod authors to pass additional information to + the signer implementation. Kubernetes does not restrict or validate this + metadata in any way. + + These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of + the PodCertificateRequest objects that Kubelet creates. + + Entries are subject to the same validation as object metadata annotations, + with the addition that all keys must be domain-prefixed. No restrictions + are placed on values, except an overall size limitation on the entire field. + + Signers should document the keys and values they support. Signers should + deny requests that contain keys they do not recognize. + type: object + required: + - keyType + - signerName + type: object + secret: + description: secret information + about the secret data + to project + properties: + items: + description: |- + 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 will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps + a string key to + a path within + a volume. + properties: + key: + description: key + is the key + to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + description: |- + 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 + type: string + optional: + description: optional + field specify whether + the Secret or its + key must be defined + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + description: serviceAccountToken + is information about + the serviceAccountToken + data to project + properties: + audience: + description: |- + 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. + type: string + expirationSeconds: + description: |- + 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 percent of + its time to live or if the token is older than 24 hours.Defaults to 1 hour + and must be at least 10 minutes. + format: int64 + type: integer path: description: |- - 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 '..'. + path is the path relative to the mount point of the file to project the + token into. type: string required: - - key - path type: object - type: array - x-kubernetes-list-type: atomic - optional: - description: optional field - specify whether the Secret - or its keys must be defined - type: boolean - secretName: + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + description: |- + quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + properties: + group: + description: |- + group to map volume access to + Default is no group + type: string + readOnly: + description: |- + readOnly here will force the Quobyte volume to be mounted with read-only permissions. + Defaults to false. + type: boolean + registry: + description: |- + 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 + type: string + tenant: + description: |- + tenant owning the given Quobyte volume in the Backend + Used with dynamically provisioned Quobyte volumes, value is set by the plugin + type: string + user: + description: |- + user to map volume access to + Defaults to serivceaccount user + type: string + volume: + description: volume is a string + that references an already + created Quobyte volume by + name. + type: string + required: + - registry + - volume + type: object + rbd: + description: |- + rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + properties: + fsType: + description: |- + 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 + type: string + image: + description: |- + image is the rados image name. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + keyring: + default: /etc/ceph/keyring + description: |- + 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 + type: string + monitors: + description: |- + monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + description: |- + pool is the rados pool name. + Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + readOnly: + description: |- + 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 + type: boolean + secretRef: + description: |- + 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 + properties: + name: + default: "" description: |- - secretName is the name of the secret in the pod's namespace to use. - More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + 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 type: string type: object - storageos: + x-kubernetes-map-type: atomic + user: + default: admin + description: |- + user is the rados user name. + Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + type: string + required: + - image + - monitors + type: object + scaleIO: + description: |- + scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + properties: + fsType: + default: xfs description: |- - storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. - Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + 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". + type: string + gateway: + description: gateway is the + host address of the ScaleIO + API Gateway. + type: string + protectionDomain: + description: protectionDomain + is the name of the ScaleIO + Protection Domain for the + configured storage. + type: string + readOnly: + description: |- + readOnly Defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: |- + secretRef references to the secret for ScaleIO user and other + sensitive information. If this is not provided, Login operation will fail. properties: - fsType: - description: |- - 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. - type: string - readOnly: - description: |- - readOnly defaults to false (read/write). ReadOnly here will force - the ReadOnly setting in VolumeMounts. - type: boolean - secretRef: - description: |- - secretRef specifies the secret to use for obtaining the StorageOS API - credentials. If not specified, default values will be attempted. - properties: - name: - default: "" - description: |- - 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 - type: string - type: object - x-kubernetes-map-type: atomic - volumeName: - description: |- - volumeName is the human-readable name of the StorageOS volume. Volume - names are only unique within a namespace. - type: string - volumeNamespace: + name: + default: "" description: |- - 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 override the default behaviour. - Set to "default" if you are not using namespaces within StorageOS. - Namespaces that do not pre-exist within StorageOS will be created. + 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 type: string type: object - vsphereVolume: + x-kubernetes-map-type: atomic + sslEnabled: + description: sslEnabled Flag + enable/disable SSL communication + with Gateway, default false + type: boolean + storageMode: + default: ThinProvisioned + description: |- + storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. + type: string + storagePool: + description: storagePool is + the ScaleIO Storage Pool associated + with the protection domain. + type: string + system: + description: system is the name + of the storage system as configured + in ScaleIO. + type: string + volumeName: + description: |- + volumeName is the name of a volume already created in the ScaleIO system + that is associated with this volume source. + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + description: |- + secret represents a secret that should populate this volume. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + properties: + defaultMode: + description: |- + 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. + format: int32 + type: integer + items: + description: |- + 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 will not be + present. If a key is specified which is not present in the Secret, + the volume setup will error unless it is marked optional. Paths must be + relative and may not contain the '..' path or start with '..'. + items: + description: Maps a string + key to a path within a volume. + properties: + key: + description: key is the + key to project. + type: string + mode: + description: |- + 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 be other mode bits set. + format: int32 + type: integer + path: + description: |- + 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 '..'. + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + description: optional field + specify whether the Secret + or its keys must be defined + type: boolean + secretName: + description: |- + secretName is the name of the secret in the pod's namespace to use. + More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + type: string + type: object + storageos: + description: |- + storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + properties: + fsType: + description: |- + 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. + type: string + readOnly: description: |- - vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. - Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type - are redirected to the csi.vsphere.vmware.com CSI driver. + readOnly defaults to false (read/write). ReadOnly here will force + the ReadOnly setting in VolumeMounts. + type: boolean + secretRef: + description: |- + secretRef specifies the secret to use for obtaining the StorageOS API + credentials. If not specified, default values will be attempted. properties: - fsType: + name: + default: "" description: |- - 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. - type: string - storagePolicyID: - description: storagePolicyID - is the storage Policy - Based Management (SPBM) - profile ID associated - with the StoragePolicyName. - type: string - storagePolicyName: - description: storagePolicyName - is the storage Policy - Based Management (SPBM) - profile name. - type: string - volumePath: - description: volumePath - is the path that identifies - vSphere volume vmdk + 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 type: string - required: - - volumePath type: object + x-kubernetes-map-type: atomic + volumeName: + description: |- + volumeName is the human-readable name of the StorageOS volume. Volume + names are only unique within a namespace. + type: string + volumeNamespace: + description: |- + 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 override the default behaviour. + Set to "default" if you are not using namespaces within StorageOS. + Namespaces that do not pre-exist within StorageOS will be created. + type: string + type: object + vsphereVolume: + description: |- + vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + are redirected to the csi.vsphere.vmware.com CSI driver. + properties: + fsType: + description: |- + 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. + type: string + storagePolicyID: + description: storagePolicyID + is the storage Policy Based + Management (SPBM) profile + ID associated with the StoragePolicyName. + type: string + storagePolicyName: + description: storagePolicyName + is the storage Policy Based + Management (SPBM) profile + name. + type: string + volumePath: + description: volumePath is the + path that identifies vSphere + volume vmdk + type: string required: - - name + - volumePath type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - required: - - containers - type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + required: + - containers type: object type: object - type: object - name: - type: string - nodeSelector: - additionalProperties: - type: string - type: object - prepareScript: - type: string - raw: - properties: - artifact: + version: type: string - entrypoint: - items: - type: string - type: array - environment: - items: - properties: - name: - type: string - value: - type: string - type: object - type: array + required: + - carrier + - version type: object - role: - type: string - runScript: - type: string - sshPublicKey: - type: string - tags: - items: - description: |- - JobTag 表示一个任务标签,由 key 和多个 value 组成。 - key 和每个 value 长度均不超过 10 个字符;一个任务最多 10 个标签; - 每个标签最多包含 10 个不同的 value。 - properties: - key: - type: string - values: - items: - type: string - type: array - required: - - key - - values - type: object - type: array - tensorBoardDir: - type: string required: + - placement - role + - runtime + - workload type: object type: array type: object type: object type: array - stopped: + suspended: type: boolean type: object status: @@ -9522,6 +9311,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map endTime: format: date-time type: string @@ -9533,9 +9325,25 @@ spec: name: type: string phase: + description: |- + JobPhase 是 Job 的聚合生命周期阶段,由控制面 Job 控制器根据其 Task 的 + 观测状态推导得出。取值集合必须与 Job 状态机保持一致。 + enum: + - Pending + - Running + - Succeeded + - Failed + - Stopped type: string type: object type: array + observedGeneration: + description: |- + ObservedGeneration 是 Workflow 控制器最近一次完成调谐时所观测到的 + metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + format: int64 + type: integer phase: enum: - Pending diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/addonstatus.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/addonstatus.go index b4a275f..6e18644 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/addonstatus.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/addonstatus.go @@ -25,9 +25,14 @@ import ( // AddonStatusApplyConfiguration represents a declarative configuration of the AddonStatus type for use // with apply. type AddonStatusApplyConfiguration struct { - Phase *rlarkiov1alpha1.AddonPhase `json:"phase,omitempty"` - Version *string `json:"version,omitempty"` - Message *string `json:"message,omitempty"` + Phase *rlarkiov1alpha1.AddonPhase `json:"phase,omitempty"` + Version *string `json:"version,omitempty"` + Message *string `json:"message,omitempty"` + // ObservedGeneration 是 Addon 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Conditions 记录 Addon 的结构化状态结论,当前仅包含 ConditionTypeReady。 Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` } @@ -61,6 +66,14 @@ func (b *AddonStatusApplyConfiguration) WithMessage(value string) *AddonStatusAp return b } +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *AddonStatusApplyConfiguration) WithObservedGeneration(value int64) *AddonStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + // WithConditions adds the given value to the Conditions field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Conditions field. diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/cluster.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/cluster.go new file mode 100644 index 0000000..1ee9035 --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/cluster.go @@ -0,0 +1,241 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ClusterApplyConfiguration represents a declarative configuration of the Cluster type for use +// with apply. +type ClusterApplyConfiguration struct { + v1.TypeMetaApplyConfiguration `json:",inline"` + *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + Spec *ClusterSpecApplyConfiguration `json:"spec,omitempty"` + Status *ClusterStatusApplyConfiguration `json:"status,omitempty"` +} + +// Cluster constructs a declarative configuration of the Cluster type for use with +// apply. +func Cluster(name string) *ClusterApplyConfiguration { + b := &ClusterApplyConfiguration{} + b.WithName(name) + b.WithKind("Cluster") + b.WithAPIVersion("rlinf.io/v1alpha1") + return b +} + +func (b ClusterApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithKind(value string) *ClusterApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithAPIVersion(value string) *ClusterApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithName(value string) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithGenerateName(value string) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithNamespace(value string) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithUID(value types.UID) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithResourceVersion(value string) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithGeneration(value int64) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *ClusterApplyConfiguration) WithLabels(entries map[string]string) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *ClusterApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *ClusterApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *ClusterApplyConfiguration) WithFinalizers(values ...string) *ClusterApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *ClusterApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithSpec(value *ClusterSpecApplyConfiguration) *ClusterApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *ClusterApplyConfiguration) WithStatus(value *ClusterStatusApplyConfiguration) *ClusterApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *ClusterApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *ClusterApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *ClusterApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *ClusterApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterspec.go new file mode 100644 index 0000000..428ce1e --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterspec.go @@ -0,0 +1,59 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// ClusterSpecApplyConfiguration represents a declarative configuration of the ClusterSpec type for use +// with apply. +// +// ClusterSpec declares the durable operational state of a data-plane cluster. +type ClusterSpecApplyConfiguration struct { + // AgentNamespace is the management-plane namespace that contains the agent heartbeat Lease and Node CRs. + AgentNamespace *string `json:"agentNamespace,omitempty"` + Cordoned *bool `json:"cordoned,omitempty"` + Draining *bool `json:"draining,omitempty"` +} + +// ClusterSpecApplyConfiguration constructs a declarative configuration of the ClusterSpec type for use with +// apply. +func ClusterSpec() *ClusterSpecApplyConfiguration { + return &ClusterSpecApplyConfiguration{} +} + +// WithAgentNamespace sets the AgentNamespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the AgentNamespace field is set to the value of the last call. +func (b *ClusterSpecApplyConfiguration) WithAgentNamespace(value string) *ClusterSpecApplyConfiguration { + b.AgentNamespace = &value + return b +} + +// WithCordoned sets the Cordoned field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Cordoned field is set to the value of the last call. +func (b *ClusterSpecApplyConfiguration) WithCordoned(value bool) *ClusterSpecApplyConfiguration { + b.Cordoned = &value + return b +} + +// WithDraining sets the Draining field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Draining field is set to the value of the last call. +func (b *ClusterSpecApplyConfiguration) WithDraining(value bool) *ClusterSpecApplyConfiguration { + b.Draining = &value + return b +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterstatus.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterstatus.go new file mode 100644 index 0000000..7b5c067 --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/clusterstatus.go @@ -0,0 +1,87 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// ClusterStatusApplyConfiguration represents a declarative configuration of the ClusterStatus type for use +// with apply. +// +// ClusterStatus reports the controller's current observation of a data-plane cluster. +type ClusterStatusApplyConfiguration struct { + Phase *rlarkiov1alpha1.ClusterPhase `json:"phase,omitempty"` + LastHeartbeatTime *v1.Time `json:"lastHeartbeatTime,omitempty"` + TotalNodes *int32 `json:"totalNodes,omitempty"` + OnlineNodes *int32 `json:"onlineNodes,omitempty"` + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` +} + +// ClusterStatusApplyConfiguration constructs a declarative configuration of the ClusterStatus type for use with +// apply. +func ClusterStatus() *ClusterStatusApplyConfiguration { + return &ClusterStatusApplyConfiguration{} +} + +// WithPhase sets the Phase field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Phase field is set to the value of the last call. +func (b *ClusterStatusApplyConfiguration) WithPhase(value rlarkiov1alpha1.ClusterPhase) *ClusterStatusApplyConfiguration { + b.Phase = &value + return b +} + +// WithLastHeartbeatTime sets the LastHeartbeatTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastHeartbeatTime field is set to the value of the last call. +func (b *ClusterStatusApplyConfiguration) WithLastHeartbeatTime(value v1.Time) *ClusterStatusApplyConfiguration { + b.LastHeartbeatTime = &value + return b +} + +// WithTotalNodes sets the TotalNodes field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the TotalNodes field is set to the value of the last call. +func (b *ClusterStatusApplyConfiguration) WithTotalNodes(value int32) *ClusterStatusApplyConfiguration { + b.TotalNodes = &value + return b +} + +// WithOnlineNodes sets the OnlineNodes field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the OnlineNodes field is set to the value of the last call. +func (b *ClusterStatusApplyConfiguration) WithOnlineNodes(value int32) *ClusterStatusApplyConfiguration { + b.OnlineNodes = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *ClusterStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ClusterStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockercontainerspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockercontainerspec.go deleted file mode 100644 index 4c6cb1a..0000000 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockercontainerspec.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2024 The RLInf Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// DockerContainerSpecApplyConfiguration represents a declarative configuration of the DockerContainerSpec type for use -// with apply. -type DockerContainerSpecApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Image *string `json:"image,omitempty"` - Command []string `json:"command,omitempty"` - Args []string `json:"args,omitempty"` - Environment []EnvVarApplyConfiguration `json:"environment,omitempty"` - Volumes []DockerVolumeRefApplyConfiguration `json:"volumes,omitempty"` -} - -// DockerContainerSpecApplyConfiguration constructs a declarative configuration of the DockerContainerSpec type for use with -// apply. -func DockerContainerSpec() *DockerContainerSpecApplyConfiguration { - return &DockerContainerSpecApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *DockerContainerSpecApplyConfiguration) WithName(value string) *DockerContainerSpecApplyConfiguration { - b.Name = &value - return b -} - -// WithImage sets the Image field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Image field is set to the value of the last call. -func (b *DockerContainerSpecApplyConfiguration) WithImage(value string) *DockerContainerSpecApplyConfiguration { - b.Image = &value - return b -} - -// WithCommand adds the given value to the Command field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Command field. -func (b *DockerContainerSpecApplyConfiguration) WithCommand(values ...string) *DockerContainerSpecApplyConfiguration { - for i := range values { - b.Command = append(b.Command, values[i]) - } - return b -} - -// WithArgs adds the given value to the Args field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Args field. -func (b *DockerContainerSpecApplyConfiguration) WithArgs(values ...string) *DockerContainerSpecApplyConfiguration { - for i := range values { - b.Args = append(b.Args, values[i]) - } - return b -} - -// WithEnvironment adds the given value to the Environment field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Environment field. -func (b *DockerContainerSpecApplyConfiguration) WithEnvironment(values ...*EnvVarApplyConfiguration) *DockerContainerSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithEnvironment") - } - b.Environment = append(b.Environment, *values[i]) - } - return b -} - -// WithVolumes adds the given value to the Volumes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Volumes field. -func (b *DockerContainerSpecApplyConfiguration) WithVolumes(values ...*DockerVolumeRefApplyConfiguration) *DockerContainerSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVolumes") - } - b.Volumes = append(b.Volumes, *values[i]) - } - return b -} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockertaskspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockertaskspec.go deleted file mode 100644 index 170f113..0000000 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockertaskspec.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2024 The RLInf Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// DockerTaskSpecApplyConfiguration represents a declarative configuration of the DockerTaskSpec type for use -// with apply. -type DockerTaskSpecApplyConfiguration struct { - Containers []DockerContainerSpecApplyConfiguration `json:"containers,omitempty"` -} - -// DockerTaskSpecApplyConfiguration constructs a declarative configuration of the DockerTaskSpec type for use with -// apply. -func DockerTaskSpec() *DockerTaskSpecApplyConfiguration { - return &DockerTaskSpecApplyConfiguration{} -} - -// WithContainers adds the given value to the Containers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Containers field. -func (b *DockerTaskSpecApplyConfiguration) WithContainers(values ...*DockerContainerSpecApplyConfiguration) *DockerTaskSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithContainers") - } - b.Containers = append(b.Containers, *values[i]) - } - return b -} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockervolumeref.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockervolumeref.go deleted file mode 100644 index 5afd5d1..0000000 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/dockervolumeref.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2024 The RLInf Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// DockerVolumeRefApplyConfiguration represents a declarative configuration of the DockerVolumeRef type for use -// with apply. -type DockerVolumeRefApplyConfiguration struct { - Source *string `json:"source,omitempty"` - Target *string `json:"target,omitempty"` -} - -// DockerVolumeRefApplyConfiguration constructs a declarative configuration of the DockerVolumeRef type for use with -// apply. -func DockerVolumeRef() *DockerVolumeRefApplyConfiguration { - return &DockerVolumeRefApplyConfiguration{} -} - -// WithSource sets the Source field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Source field is set to the value of the last call. -func (b *DockerVolumeRefApplyConfiguration) WithSource(value string) *DockerVolumeRefApplyConfiguration { - b.Source = &value - return b -} - -// WithTarget sets the Target field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Target field is set to the value of the last call. -func (b *DockerVolumeRefApplyConfiguration) WithTarget(value string) *DockerVolumeRefApplyConfiguration { - b.Target = &value - return b -} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/domainstatus.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/domainstatus.go index 4c5bcc0..aa1178e 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/domainstatus.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/domainstatus.go @@ -17,9 +17,22 @@ limitations under the License. package v1alpha1 +import ( + v1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + // DomainStatusApplyConfiguration represents a declarative configuration of the DomainStatus type for use // with apply. type DomainStatusApplyConfiguration struct { + // ObservedGeneration 是 Domain 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在依据 + // ipAllocations 做判断前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // Conditions 记录 Domain 的结构化状态结论,当前仅包含 ConditionTypeValidated + // (Spec.CIDR 是否合法)。它由 Spec 驱动,写入方必须填写 ObservedGeneration。 + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // IPAllocations 由 Domain 控制器独占写入,其它组件不得修改。该列表规模随 + // Domain CIDR 增长(/16 可达数万条)。 IPAllocations []DomainIPAllocationApplyConfiguration `json:"ipAllocations,omitempty"` } @@ -29,6 +42,27 @@ func DomainStatus() *DomainStatusApplyConfiguration { return &DomainStatusApplyConfiguration{} } +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *DomainStatusApplyConfiguration) WithObservedGeneration(value int64) *DomainStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *DomainStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *DomainStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + // WithIPAllocations adds the given value to the IPAllocations field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the IPAllocations field. diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/envvar.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/envvar.go deleted file mode 100644 index b516e2a..0000000 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/envvar.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2024 The RLInf Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// EnvVarApplyConfiguration represents a declarative configuration of the EnvVar type for use -// with apply. -type EnvVarApplyConfiguration struct { - Name *string `json:"name,omitempty"` - Value *string `json:"value,omitempty"` -} - -// EnvVarApplyConfiguration constructs a declarative configuration of the EnvVar type for use with -// apply. -func EnvVar() *EnvVarApplyConfiguration { - return &EnvVarApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *EnvVarApplyConfiguration) WithName(value string) *EnvVarApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *EnvVarApplyConfiguration) WithValue(value string) *EnvVarApplyConfiguration { - b.Value = &value - return b -} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobspec.go index ccafeb9..0c4f237 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobspec.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobspec.go @@ -20,8 +20,9 @@ package v1alpha1 // JobSpecApplyConfiguration represents a declarative configuration of the JobSpec type for use // with apply. type JobSpecApplyConfiguration struct { - Domain *string `json:"domain,omitempty"` - Stopped *bool `json:"stopped,omitempty"` + Domain *string `json:"domain,omitempty"` + // Setting spec.suspended to true starts an orderly stop without deleting the Job resource. The Job becomes Stopped and is archived into the persistence backend after ArchiveTTL (default 5 minutes), while the Job CR is deleted from kcp. Starting the Job via POST /jobs/:name/start restores it from the persistence backend with the same name and spec but a new Kubernetes UID. + Suspended *bool `json:"suspended,omitempty"` Tasks []JobTaskTemplateApplyConfiguration `json:"tasks,omitempty"` SSHPublicKey *string `json:"sshPublicKey,omitempty"` Tags []JobTagApplyConfiguration `json:"tags,omitempty"` @@ -41,11 +42,11 @@ func (b *JobSpecApplyConfiguration) WithDomain(value string) *JobSpecApplyConfig return b } -// WithStopped sets the Stopped field in the declarative configuration to the given value +// WithSuspended sets the Suspended field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Stopped field is set to the value of the last call. -func (b *JobSpecApplyConfiguration) WithStopped(value bool) *JobSpecApplyConfiguration { - b.Stopped = &value +// If called multiple times, the Suspended field is set to the value of the last call. +func (b *JobSpecApplyConfiguration) WithSuspended(value bool) *JobSpecApplyConfiguration { + b.Suspended = &value return b } diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobstatus.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobstatus.go index b6c063f..cd22eda 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobstatus.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobstatus.go @@ -26,11 +26,15 @@ import ( // JobStatusApplyConfiguration represents a declarative configuration of the JobStatus type for use // with apply. type JobStatusApplyConfiguration struct { - Phase *rlarkiov1alpha1.JobPhase `json:"phase,omitempty"` - Tasks []JobTaskStatusApplyConfiguration `json:"tasks,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - StartTime *metav1.Time `json:"startTime,omitempty"` - EndTime *metav1.Time `json:"endTime,omitempty"` + Phase *rlarkiov1alpha1.JobPhase `json:"phase,omitempty"` + // ObservedGeneration 是 Job 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Tasks []JobTaskStatusApplyConfiguration `json:"tasks,omitempty"` + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + StartTime *metav1.Time `json:"startTime,omitempty"` + EndTime *metav1.Time `json:"endTime,omitempty"` } // JobStatusApplyConfiguration constructs a declarative configuration of the JobStatus type for use with @@ -47,6 +51,14 @@ func (b *JobStatusApplyConfiguration) WithPhase(value rlarkiov1alpha1.JobPhase) return b } +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *JobStatusApplyConfiguration) WithObservedGeneration(value int64) *JobStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + // WithTasks adds the given value to the Tasks field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Tasks field. diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtag.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtag.go index 6ca9780..a6b3eb6 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtag.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtag.go @@ -21,8 +21,8 @@ package v1alpha1 // with apply. // // JobTag 表示一个任务标签,由 key 和多个 value 组成。 -// key 和每个 value 长度均不超过 10 个字符;一个任务最多 10 个标签; -// 每个标签最多包含 10 个不同的 value。 +// 标签的个数与 key/value 长度上限不在 CRD Schema 层封闭,由 Gateway 在写入 +// 路径上校验,详见开发者文档的 API 约定。 type JobTagApplyConfiguration struct { Key *string `json:"key,omitempty"` Values []string `json:"values,omitempty"` @@ -42,9 +42,12 @@ func (b *JobTagApplyConfiguration) WithKey(value string) *JobTagApplyConfigurati return b } -// WithValues adds the given values to the Values field in the declarative configuration -// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// WithValues adds the given value to the Values field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Values field. func (b *JobTagApplyConfiguration) WithValues(values ...string) *JobTagApplyConfiguration { - b.Values = append(b.Values, values...) + for i := range values { + b.Values = append(b.Values, values[i]) + } return b } diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtasktemplate.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtasktemplate.go index 456919c..90bf35a 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtasktemplate.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/jobtasktemplate.go @@ -51,14 +51,6 @@ func (b *JobTaskTemplateApplyConfiguration) WithHead(value bool) *JobTaskTemplat return b } -// WithAgentType sets the AgentType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AgentType field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithAgentType(value rlarkiov1alpha1.AgentType) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.AgentType = &value - return b -} - // WithRole sets the Role field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Role field is set to the value of the last call. @@ -67,14 +59,6 @@ func (b *JobTaskTemplateApplyConfiguration) WithRole(value rlarkiov1alpha1.TaskR return b } -// WithDomain sets the Domain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Domain field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithDomain(value string) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.Domain = &value - return b -} - // WithDownstreamName sets the DownstreamName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DownstreamName field is set to the value of the last call. @@ -83,73 +67,48 @@ func (b *JobTaskTemplateApplyConfiguration) WithDownstreamName(value string) *Jo return b } -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *JobTaskTemplateApplyConfiguration) WithNodeSelector(entries map[string]string) *JobTaskTemplateApplyConfiguration { - if b.TaskSpecApplyConfiguration.NodeSelector == nil && len(entries) > 0 { - b.TaskSpecApplyConfiguration.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.TaskSpecApplyConfiguration.NodeSelector[k] = v - } - return b -} - -// WithKubernetes sets the Kubernetes field in the declarative configuration to the given value +// WithSuspended sets the Suspended field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kubernetes field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithKubernetes(value *KubernetesTaskSpecApplyConfiguration) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.Kubernetes = value +// If called multiple times, the Suspended field is set to the value of the last call. +func (b *JobTaskTemplateApplyConfiguration) WithSuspended(value bool) *JobTaskTemplateApplyConfiguration { + b.TaskSpecApplyConfiguration.Suspended = &value return b } -// WithDocker sets the Docker field in the declarative configuration to the given value +// WithPlacement sets the Placement field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Docker field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithDocker(value *DockerTaskSpecApplyConfiguration) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.Docker = value +// If called multiple times, the Placement field is set to the value of the last call. +func (b *JobTaskTemplateApplyConfiguration) WithPlacement(value *TaskPlacementSpecApplyConfiguration) *JobTaskTemplateApplyConfiguration { + b.TaskSpecApplyConfiguration.Placement = value return b } -// WithRaw sets the Raw field in the declarative configuration to the given value +// WithRuntime sets the Runtime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Raw field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithRaw(value *RawTaskSpecApplyConfiguration) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.Raw = value +// If called multiple times, the Runtime field is set to the value of the last call. +func (b *JobTaskTemplateApplyConfiguration) WithRuntime(value *TaskRuntimeSpecApplyConfiguration) *JobTaskTemplateApplyConfiguration { + b.TaskSpecApplyConfiguration.Runtime = value return b } -// WithTensorBoardDir sets the TensorBoardDir field in the declarative configuration to the given value +// WithWorkload sets the Workload field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TensorBoardDir field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithTensorBoardDir(value string) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.TensorBoardDir = &value +// If called multiple times, the Workload field is set to the value of the last call. +func (b *JobTaskTemplateApplyConfiguration) WithWorkload(value *TaskWorkloadSpecApplyConfiguration) *JobTaskTemplateApplyConfiguration { + b.TaskSpecApplyConfiguration.Workload = value return b } -// WithPrepareScript sets the PrepareScript field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrepareScript field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithPrepareScript(value string) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.PrepareScript = &value - return b -} - -// WithRunScript sets the RunScript field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RunScript field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithRunScript(value string) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.RunScript = &value - return b -} - -// WithSSHPublicKey sets the SSHPublicKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SSHPublicKey field is set to the value of the last call. -func (b *JobTaskTemplateApplyConfiguration) WithSSHPublicKey(value string) *JobTaskTemplateApplyConfiguration { - b.TaskSpecApplyConfiguration.SSHPublicKey = &value +// WithEnvironments adds the given value to the Environments field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Environments field. +func (b *JobTaskTemplateApplyConfiguration) WithEnvironments(values ...*TaskEnvironmentApplyConfiguration) *JobTaskTemplateApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithEnvironments") + } + b.TaskSpecApplyConfiguration.Environments = append(b.TaskSpecApplyConfiguration.Environments, *values[i]) + } return b } diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetestaskspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetestaskspec.go deleted file mode 100644 index 7ea2cf9..0000000 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetestaskspec.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2024 The RLInf Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// KubernetesTaskSpecApplyConfiguration represents a declarative configuration of the KubernetesTaskSpec type for use -// with apply. -type KubernetesTaskSpecApplyConfiguration struct { - Workload *KubernetesWorkloadSpecApplyConfiguration `json:"workload,omitempty"` -} - -// KubernetesTaskSpecApplyConfiguration constructs a declarative configuration of the KubernetesTaskSpec type for use with -// apply. -func KubernetesTaskSpec() *KubernetesTaskSpecApplyConfiguration { - return &KubernetesTaskSpecApplyConfiguration{} -} - -// WithWorkload sets the Workload field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Workload field is set to the value of the last call. -func (b *KubernetesTaskSpecApplyConfiguration) WithWorkload(value *KubernetesWorkloadSpecApplyConfiguration) *KubernetesTaskSpecApplyConfiguration { - b.Workload = value - return b -} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetesworkloadspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetesworkloadspec.go deleted file mode 100644 index 4ae215d..0000000 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/kubernetesworkloadspec.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2024 The RLInf Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - rlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" - v1 "k8s.io/api/core/v1" -) - -// KubernetesWorkloadSpecApplyConfiguration represents a declarative configuration of the KubernetesWorkloadSpec type for use -// with apply. -type KubernetesWorkloadSpecApplyConfiguration struct { - Kind *rlarkiov1alpha1.KubernetesWorkloadKind `json:"kind,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - Template *v1.PodTemplateSpec `json:"template,omitempty"` - // Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.StorageClassName instead. - PvcStorageMap map[string]string `json:"pvcStorageMap,omitempty"` - // Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests instead. - PvcSizeGbMap map[string]int32 `json:"pvcSizeGbMap,omitempty"` -} - -// KubernetesWorkloadSpecApplyConfiguration constructs a declarative configuration of the KubernetesWorkloadSpec type for use with -// apply. -func KubernetesWorkloadSpec() *KubernetesWorkloadSpecApplyConfiguration { - return &KubernetesWorkloadSpecApplyConfiguration{} -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *KubernetesWorkloadSpecApplyConfiguration) WithKind(value rlarkiov1alpha1.KubernetesWorkloadKind) *KubernetesWorkloadSpecApplyConfiguration { - b.Kind = &value - return b -} - -// WithReplicas sets the Replicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Replicas field is set to the value of the last call. -func (b *KubernetesWorkloadSpecApplyConfiguration) WithReplicas(value int32) *KubernetesWorkloadSpecApplyConfiguration { - b.Replicas = &value - return b -} - -// WithTemplate sets the Template field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Template field is set to the value of the last call. -func (b *KubernetesWorkloadSpecApplyConfiguration) WithTemplate(value v1.PodTemplateSpec) *KubernetesWorkloadSpecApplyConfiguration { - b.Template = &value - return b -} - -// WithPvcStorageMap puts the entries into the PvcStorageMap field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the PvcStorageMap field, -// overwriting an existing map entries in PvcStorageMap field with the same key. -func (b *KubernetesWorkloadSpecApplyConfiguration) WithPvcStorageMap(entries map[string]string) *KubernetesWorkloadSpecApplyConfiguration { - if b.PvcStorageMap == nil && len(entries) > 0 { - b.PvcStorageMap = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.PvcStorageMap[k] = v - } - return b -} - -// WithPvcSizeGbMap puts the entries into the PvcSizeGbMap field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the PvcSizeGbMap field, -// overwriting an existing map entries in PvcSizeGbMap field with the same key. -func (b *KubernetesWorkloadSpecApplyConfiguration) WithPvcSizeGbMap(entries map[string]int32) *KubernetesWorkloadSpecApplyConfiguration { - if b.PvcSizeGbMap == nil && len(entries) > 0 { - b.PvcSizeGbMap = make(map[string]int32, len(entries)) - } - for k, v := range entries { - b.PvcSizeGbMap[k] = v - } - return b -} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/nodestatus.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/nodestatus.go index f1ff8b0..f23b585 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/nodestatus.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/nodestatus.go @@ -19,26 +19,45 @@ package v1alpha1 import ( rlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" - v1 "k8s.io/api/core/v1" + corev1 "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) // NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use // with apply. type NodeStatusApplyConfiguration struct { - Phase *rlarkiov1alpha1.NodePhase `json:"phase,omitempty"` - Reason *string `json:"reason,omitempty"` - NodeInfo *NodeInfoApplyConfiguration `json:"nodeInfo,omitempty"` - Addresses []v1.NodeAddress `json:"addresses,omitempty"` + // Phase 是节点连通性聚合阶段,由数据面 node-agent 上报。 + Phase *rlarkiov1alpha1.NodePhase `json:"phase,omitempty"` + // Reason 是 Phase 的机器可读原因(CamelCase),与 Conditions 中 + // ConditionTypeReady 的 Reason 同源,供列表视图直接展示。 + // 该字段与 Conditions 均由数据面 node-agent 独占写入。 + Reason *string `json:"reason,omitempty"` + // Conditions 记录节点的结构化状态结论,当前仅包含 ConditionTypeReady。 + // 它由观测(而非 Spec)驱动,因此不填写 ObservedGeneration。 + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // LastHeartbeatTime 是控制面 Node Reconciler 从 Agent Lease 读取到的最近一次 + // 心跳续约时间;数据面不写入本字段。 + LastHeartbeatTime *metav1.Time `json:"lastHeartbeatTime,omitempty"` + // LastStatusChangeTime 是 Phase 最近一次发生变化的时间,与 LastHeartbeatTime + // 同由控制面 Node Reconciler 写入,用于区分「长时间保持同一状态」与「刚刚翻转」。 + LastStatusChangeTime *metav1.Time `json:"lastStatusChangeTime,omitempty"` + // NodeInfo 是节点基础信息,由数据面 Agent 上报;控制面不写入本字段。 + NodeInfo *NodeInfoApplyConfiguration `json:"nodeInfo,omitempty"` + // Addresses 是节点地址列表(InternalIP / Hostname 等)。 + Addresses []corev1.NodeAddress `json:"addresses,omitempty"` DiskPressure *bool `json:"diskPressure,omitempty"` Storage *NodeStorageStatusApplyConfiguration `json:"storage,omitempty"` - Allocatable *v1.ResourceList `json:"allocatable,omitempty"` + Allocatable *corev1.ResourceList `json:"allocatable,omitempty"` // 需要预留系统组件 agent - Capacity *v1.ResourceList `json:"capacity,omitempty"` - Used *v1.ResourceList `json:"used,omitempty"` + Capacity *corev1.ResourceList `json:"capacity,omitempty"` + Used *corev1.ResourceList `json:"used,omitempty"` + // PullProgress 是节点上正在进行的镜像拉取进度,由 node-agent 上报。 PullProgress []PullProgressApplyConfiguration `json:"pullProgress,omitempty"` // Events 由数据面 node-agent 上报节点相关 Kubernetes Event(如 DiskPressure // 等 Warning 事件及镜像拉取/调度相关事件)。控制面 Task reconciler 在 Task // 处于 Pending 期间聚合各节点事件到 Task.status.events,供前端展示。 + // 条目数量由 node-agent 侧裁剪(最多保留 50 条)。 Events []NodeEventApplyConfiguration `json:"events,omitempty"` } @@ -64,6 +83,35 @@ func (b *NodeStatusApplyConfiguration) WithReason(value string) *NodeStatusApply return b } +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *NodeStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *NodeStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithLastHeartbeatTime sets the LastHeartbeatTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastHeartbeatTime field is set to the value of the last call. +func (b *NodeStatusApplyConfiguration) WithLastHeartbeatTime(value metav1.Time) *NodeStatusApplyConfiguration { + b.LastHeartbeatTime = &value + return b +} + +// WithLastStatusChangeTime sets the LastStatusChangeTime field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the LastStatusChangeTime field is set to the value of the last call. +func (b *NodeStatusApplyConfiguration) WithLastStatusChangeTime(value metav1.Time) *NodeStatusApplyConfiguration { + b.LastStatusChangeTime = &value + return b +} + // WithNodeInfo sets the NodeInfo field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the NodeInfo field is set to the value of the last call. @@ -75,7 +123,7 @@ func (b *NodeStatusApplyConfiguration) WithNodeInfo(value *NodeInfoApplyConfigur // WithAddresses adds the given value to the Addresses field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Addresses field. -func (b *NodeStatusApplyConfiguration) WithAddresses(values ...v1.NodeAddress) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithAddresses(values ...corev1.NodeAddress) *NodeStatusApplyConfiguration { for i := range values { b.Addresses = append(b.Addresses, values[i]) } @@ -101,7 +149,7 @@ func (b *NodeStatusApplyConfiguration) WithStorage(value *NodeStorageStatusApply // WithAllocatable sets the Allocatable field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Allocatable field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithAllocatable(value v1.ResourceList) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithAllocatable(value corev1.ResourceList) *NodeStatusApplyConfiguration { b.Allocatable = &value return b } @@ -109,7 +157,7 @@ func (b *NodeStatusApplyConfiguration) WithAllocatable(value v1.ResourceList) *N // WithCapacity sets the Capacity field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Capacity field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithCapacity(value corev1.ResourceList) *NodeStatusApplyConfiguration { b.Capacity = &value return b } @@ -117,7 +165,7 @@ func (b *NodeStatusApplyConfiguration) WithCapacity(value v1.ResourceList) *Node // WithUsed sets the Used field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Used field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithUsed(value v1.ResourceList) *NodeStatusApplyConfiguration { +func (b *NodeStatusApplyConfiguration) WithUsed(value corev1.ResourceList) *NodeStatusApplyConfiguration { b.Used = &value return b } diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/rawtaskspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/rawtaskspec.go deleted file mode 100644 index 4c51375..0000000 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/rawtaskspec.go +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2024 The RLInf Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// RawTaskSpecApplyConfiguration represents a declarative configuration of the RawTaskSpec type for use -// with apply. -type RawTaskSpecApplyConfiguration struct { - Artifact *string `json:"artifact,omitempty"` - Entrypoint []string `json:"entrypoint,omitempty"` - Environment []EnvVarApplyConfiguration `json:"environment,omitempty"` -} - -// RawTaskSpecApplyConfiguration constructs a declarative configuration of the RawTaskSpec type for use with -// apply. -func RawTaskSpec() *RawTaskSpecApplyConfiguration { - return &RawTaskSpecApplyConfiguration{} -} - -// WithArtifact sets the Artifact field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Artifact field is set to the value of the last call. -func (b *RawTaskSpecApplyConfiguration) WithArtifact(value string) *RawTaskSpecApplyConfiguration { - b.Artifact = &value - return b -} - -// WithEntrypoint adds the given value to the Entrypoint field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Entrypoint field. -func (b *RawTaskSpecApplyConfiguration) WithEntrypoint(values ...string) *RawTaskSpecApplyConfiguration { - for i := range values { - b.Entrypoint = append(b.Entrypoint, values[i]) - } - return b -} - -// WithEnvironment adds the given value to the Environment field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Environment field. -func (b *RawTaskSpecApplyConfiguration) WithEnvironment(values ...*EnvVarApplyConfiguration) *RawTaskSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithEnvironment") - } - b.Environment = append(b.Environment, *values[i]) - } - return b -} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskenvironment.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskenvironment.go new file mode 100644 index 0000000..c638cfe --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskenvironment.go @@ -0,0 +1,65 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" +) + +// TaskEnvironmentApplyConfiguration represents a declarative configuration of the TaskEnvironment type for use +// with apply. +// +// TaskEnvironment 表示 Task 请求的一种可扩展环境能力。 +// Type 是带所有者作用域的稳定类型标识,Version 表示该类型的参数版本。 +// Parameters 必须由对应的已注册 Handler 严格解码和校验;未知类型、未知版本或 +// 非法参数必须在产生任何外部副作用前被拒绝。 +type TaskEnvironmentApplyConfiguration struct { + Type *string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` + Parameters *v1.JSON `json:"parameters,omitempty"` +} + +// TaskEnvironmentApplyConfiguration constructs a declarative configuration of the TaskEnvironment type for use with +// apply. +func TaskEnvironment() *TaskEnvironmentApplyConfiguration { + return &TaskEnvironmentApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *TaskEnvironmentApplyConfiguration) WithType(value string) *TaskEnvironmentApplyConfiguration { + b.Type = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *TaskEnvironmentApplyConfiguration) WithVersion(value string) *TaskEnvironmentApplyConfiguration { + b.Version = &value + return b +} + +// WithParameters sets the Parameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Parameters field is set to the value of the last call. +func (b *TaskEnvironmentApplyConfiguration) WithParameters(value v1.JSON) *TaskEnvironmentApplyConfiguration { + b.Parameters = &value + return b +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskplacementspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskplacementspec.go new file mode 100644 index 0000000..9bbcfa4 --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskplacementspec.go @@ -0,0 +1,46 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +// TaskPlacementSpecApplyConfiguration represents a declarative configuration of the TaskPlacementSpec type for use +// with apply. +// +// TaskPlacementSpec describes scheduling constraints for the workload. +type TaskPlacementSpecApplyConfiguration struct { + NodeSelector map[string]string `json:"nodeSelector,omitempty"` +} + +// TaskPlacementSpecApplyConfiguration constructs a declarative configuration of the TaskPlacementSpec type for use with +// apply. +func TaskPlacementSpec() *TaskPlacementSpecApplyConfiguration { + return &TaskPlacementSpecApplyConfiguration{} +} + +// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the NodeSelector field, +// overwriting an existing map entries in NodeSelector field with the same key. +func (b *TaskPlacementSpecApplyConfiguration) WithNodeSelector(entries map[string]string) *TaskPlacementSpecApplyConfiguration { + if b.NodeSelector == nil && len(entries) > 0 { + b.NodeSelector = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.NodeSelector[k] = v + } + return b +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskruntimespec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskruntimespec.go new file mode 100644 index 0000000..0e40819 --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskruntimespec.go @@ -0,0 +1,55 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" +) + +// TaskRuntimeSpecApplyConfiguration represents a declarative configuration of the TaskRuntimeSpec type for use +// with apply. +// +// TaskRuntimeSpec selects the runtime implementation and instance that lowers +// the common Pod template. Name is a stable runtime instance identifier; it is +// not a display name or proof of ownership. +type TaskRuntimeSpecApplyConfiguration struct { + Kind *rlarkiov1alpha1.RuntimeKind `json:"kind,omitempty"` + Name *string `json:"name,omitempty"` +} + +// TaskRuntimeSpecApplyConfiguration constructs a declarative configuration of the TaskRuntimeSpec type for use with +// apply. +func TaskRuntimeSpec() *TaskRuntimeSpecApplyConfiguration { + return &TaskRuntimeSpecApplyConfiguration{} +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *TaskRuntimeSpecApplyConfiguration) WithKind(value rlarkiov1alpha1.RuntimeKind) *TaskRuntimeSpecApplyConfiguration { + b.Kind = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *TaskRuntimeSpecApplyConfiguration) WithName(value string) *TaskRuntimeSpecApplyConfiguration { + b.Name = &value + return b +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskspec.go index 99e375a..269c91c 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskspec.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskspec.go @@ -24,24 +24,14 @@ import ( // TaskSpecApplyConfiguration represents a declarative configuration of the TaskSpec type for use // with apply. type TaskSpecApplyConfiguration struct { - AgentType *rlarkiov1alpha1.AgentType `json:"agentType,omitempty"` - Role *rlarkiov1alpha1.TaskRole `json:"role,omitempty"` - Domain *string `json:"domain,omitempty"` - // 所属 Domain 名称,从 Job 继承 - DownstreamName *string `json:"downstreamName,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // value 可以是 ',' 分隔的多个值 - Kubernetes *KubernetesTaskSpecApplyConfiguration `json:"kubernetes,omitempty"` - Docker *DockerTaskSpecApplyConfiguration `json:"docker,omitempty"` - Raw *RawTaskSpecApplyConfiguration `json:"raw,omitempty"` - TensorBoardDir *string `json:"tensorBoardDir,omitempty"` - PrepareScript *string `json:"prepareScript,omitempty"` - // Ray 集群启动前执行的脚本 - RunScript *string `json:"runScript,omitempty"` - // Ray 集群就绪后执行的脚本(仅 head 节点) - SSHPublicKey *string `json:"sshPublicKey,omitempty"` - // 注入到 Pod authorized_keys 的 SSH 公钥 - Tags []JobTagApplyConfiguration `json:"tags,omitempty"` + Role *rlarkiov1alpha1.TaskRole `json:"role,omitempty"` + DownstreamName *string `json:"downstreamName,omitempty"` + Suspended *bool `json:"suspended,omitempty"` + Placement *TaskPlacementSpecApplyConfiguration `json:"placement,omitempty"` + Runtime *TaskRuntimeSpecApplyConfiguration `json:"runtime,omitempty"` + Workload *TaskWorkloadSpecApplyConfiguration `json:"workload,omitempty"` + Environments []TaskEnvironmentApplyConfiguration `json:"environments,omitempty"` + Tags []JobTagApplyConfiguration `json:"tags,omitempty"` } // TaskSpecApplyConfiguration constructs a declarative configuration of the TaskSpec type for use with @@ -50,14 +40,6 @@ func TaskSpec() *TaskSpecApplyConfiguration { return &TaskSpecApplyConfiguration{} } -// WithAgentType sets the AgentType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AgentType field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithAgentType(value rlarkiov1alpha1.AgentType) *TaskSpecApplyConfiguration { - b.AgentType = &value - return b -} - // WithRole sets the Role field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Role field is set to the value of the last call. @@ -66,14 +48,6 @@ func (b *TaskSpecApplyConfiguration) WithRole(value rlarkiov1alpha1.TaskRole) *T return b } -// WithDomain sets the Domain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Domain field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithDomain(value string) *TaskSpecApplyConfiguration { - b.Domain = &value - return b -} - // WithDownstreamName sets the DownstreamName field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the DownstreamName field is set to the value of the last call. @@ -82,73 +56,48 @@ func (b *TaskSpecApplyConfiguration) WithDownstreamName(value string) *TaskSpecA return b } -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *TaskSpecApplyConfiguration) WithNodeSelector(entries map[string]string) *TaskSpecApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithKubernetes sets the Kubernetes field in the declarative configuration to the given value +// WithSuspended sets the Suspended field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kubernetes field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithKubernetes(value *KubernetesTaskSpecApplyConfiguration) *TaskSpecApplyConfiguration { - b.Kubernetes = value +// If called multiple times, the Suspended field is set to the value of the last call. +func (b *TaskSpecApplyConfiguration) WithSuspended(value bool) *TaskSpecApplyConfiguration { + b.Suspended = &value return b } -// WithDocker sets the Docker field in the declarative configuration to the given value +// WithPlacement sets the Placement field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Docker field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithDocker(value *DockerTaskSpecApplyConfiguration) *TaskSpecApplyConfiguration { - b.Docker = value +// If called multiple times, the Placement field is set to the value of the last call. +func (b *TaskSpecApplyConfiguration) WithPlacement(value *TaskPlacementSpecApplyConfiguration) *TaskSpecApplyConfiguration { + b.Placement = value return b } -// WithRaw sets the Raw field in the declarative configuration to the given value +// WithRuntime sets the Runtime field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Raw field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithRaw(value *RawTaskSpecApplyConfiguration) *TaskSpecApplyConfiguration { - b.Raw = value +// If called multiple times, the Runtime field is set to the value of the last call. +func (b *TaskSpecApplyConfiguration) WithRuntime(value *TaskRuntimeSpecApplyConfiguration) *TaskSpecApplyConfiguration { + b.Runtime = value return b } -// WithTensorBoardDir sets the TensorBoardDir field in the declarative configuration to the given value +// WithWorkload sets the Workload field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TensorBoardDir field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithTensorBoardDir(value string) *TaskSpecApplyConfiguration { - b.TensorBoardDir = &value +// If called multiple times, the Workload field is set to the value of the last call. +func (b *TaskSpecApplyConfiguration) WithWorkload(value *TaskWorkloadSpecApplyConfiguration) *TaskSpecApplyConfiguration { + b.Workload = value return b } -// WithPrepareScript sets the PrepareScript field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrepareScript field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithPrepareScript(value string) *TaskSpecApplyConfiguration { - b.PrepareScript = &value - return b -} - -// WithRunScript sets the RunScript field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RunScript field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithRunScript(value string) *TaskSpecApplyConfiguration { - b.RunScript = &value - return b -} - -// WithSSHPublicKey sets the SSHPublicKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SSHPublicKey field is set to the value of the last call. -func (b *TaskSpecApplyConfiguration) WithSSHPublicKey(value string) *TaskSpecApplyConfiguration { - b.SSHPublicKey = &value +// WithEnvironments adds the given value to the Environments field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Environments field. +func (b *TaskSpecApplyConfiguration) WithEnvironments(values ...*TaskEnvironmentApplyConfiguration) *TaskSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithEnvironments") + } + b.Environments = append(b.Environments, *values[i]) + } return b } diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskstatus.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskstatus.go index 3b8377c..02f8cea 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskstatus.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskstatus.go @@ -26,7 +26,13 @@ import ( // TaskStatusApplyConfiguration represents a declarative configuration of the TaskStatus type for use // with apply. type TaskStatusApplyConfiguration struct { - Phase *rlarkiov1alpha1.TaskPhase `json:"phase,omitempty"` + Phase *rlarkiov1alpha1.TaskPhase `json:"phase,omitempty"` + // ObservedGeneration 是数据面 Agent 最近一次完成本地工作负载调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / message / observedNodes 之前,应比较本字段与 metadata.generation + // 以识别过期状态。 + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + // ObservedNodes 是当前承载该 Task 工作负载的节点名,由数据面 Agent 排序去重后上报。 ObservedNodes []string `json:"observedNodes,omitempty"` Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` @@ -58,6 +64,14 @@ func (b *TaskStatusApplyConfiguration) WithPhase(value rlarkiov1alpha1.TaskPhase return b } +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *TaskStatusApplyConfiguration) WithObservedGeneration(value int64) *TaskStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + // WithObservedNodes adds the given value to the ObservedNodes field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the ObservedNodes field. diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadcarrier.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadcarrier.go new file mode 100644 index 0000000..ca04ac0 --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadcarrier.go @@ -0,0 +1,65 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" +) + +// TaskWorkloadCarrierApplyConfiguration represents a declarative configuration of the TaskWorkloadCarrier type for use +// with apply. +// +// TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a +// workload. Type and Version identify a carrier contract; Parameters remain +// opaque until the selected Adapter or Runtime implementation strictly decodes +// them. Carrier identifiers are open strings, not CRD enums. +type TaskWorkloadCarrierApplyConfiguration struct { + Type *string `json:"type,omitempty"` + Version *string `json:"version,omitempty"` + Parameters *v1.JSON `json:"parameters,omitempty"` +} + +// TaskWorkloadCarrierApplyConfiguration constructs a declarative configuration of the TaskWorkloadCarrier type for use with +// apply. +func TaskWorkloadCarrier() *TaskWorkloadCarrierApplyConfiguration { + return &TaskWorkloadCarrierApplyConfiguration{} +} + +// WithType sets the Type field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Type field is set to the value of the last call. +func (b *TaskWorkloadCarrierApplyConfiguration) WithType(value string) *TaskWorkloadCarrierApplyConfiguration { + b.Type = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *TaskWorkloadCarrierApplyConfiguration) WithVersion(value string) *TaskWorkloadCarrierApplyConfiguration { + b.Version = &value + return b +} + +// WithParameters sets the Parameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Parameters field is set to the value of the last call. +func (b *TaskWorkloadCarrierApplyConfiguration) WithParameters(value v1.JSON) *TaskWorkloadCarrierApplyConfiguration { + b.Parameters = &value + return b +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadspec.go new file mode 100644 index 0000000..226a575 --- /dev/null +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/taskworkloadspec.go @@ -0,0 +1,85 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" +) + +// TaskWorkloadSpecApplyConfiguration represents a declarative configuration of the TaskWorkloadSpec type for use +// with apply. +// +// TaskWorkloadSpec is the common workload declaration for every runtime. +// Kubernetes applies the Pod template natively. Future Docker and Raw providers +// lower the subset they support and reject unsupported fields before producing +// external effects. +type TaskWorkloadSpecApplyConfiguration struct { + Kind *rlarkiov1alpha1.WorkloadKind `json:"kind,omitempty"` + Version *string `json:"version,omitempty"` + Parameters *v1.JSON `json:"parameters,omitempty"` + Carrier *TaskWorkloadCarrierApplyConfiguration `json:"carrier,omitempty"` + Template *corev1.PodTemplateSpec `json:"template,omitempty"` +} + +// TaskWorkloadSpecApplyConfiguration constructs a declarative configuration of the TaskWorkloadSpec type for use with +// apply. +func TaskWorkloadSpec() *TaskWorkloadSpecApplyConfiguration { + return &TaskWorkloadSpecApplyConfiguration{} +} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *TaskWorkloadSpecApplyConfiguration) WithKind(value rlarkiov1alpha1.WorkloadKind) *TaskWorkloadSpecApplyConfiguration { + b.Kind = &value + return b +} + +// WithVersion sets the Version field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Version field is set to the value of the last call. +func (b *TaskWorkloadSpecApplyConfiguration) WithVersion(value string) *TaskWorkloadSpecApplyConfiguration { + b.Version = &value + return b +} + +// WithParameters sets the Parameters field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Parameters field is set to the value of the last call. +func (b *TaskWorkloadSpecApplyConfiguration) WithParameters(value v1.JSON) *TaskWorkloadSpecApplyConfiguration { + b.Parameters = &value + return b +} + +// WithCarrier sets the Carrier field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Carrier field is set to the value of the last call. +func (b *TaskWorkloadSpecApplyConfiguration) WithCarrier(value *TaskWorkloadCarrierApplyConfiguration) *TaskWorkloadSpecApplyConfiguration { + b.Carrier = value + return b +} + +// WithTemplate sets the Template field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Template field is set to the value of the last call. +func (b *TaskWorkloadSpecApplyConfiguration) WithTemplate(value corev1.PodTemplateSpec) *TaskWorkloadSpecApplyConfiguration { + b.Template = &value + return b +} diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowjobtemplate.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowjobtemplate.go index fd3cd55..4df1421 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowjobtemplate.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowjobtemplate.go @@ -20,7 +20,9 @@ package v1alpha1 // WorkflowJobTemplateApplyConfiguration represents a declarative configuration of the WorkflowJobTemplate type for use // with apply. type WorkflowJobTemplateApplyConfiguration struct { - Name *string `json:"name,omitempty"` + Name *string `json:"name,omitempty"` + // Dependencies 是同一 Workflow 内其它 Job 模板的名字,依赖关系只存在于 + // Job 之间,不存在于 Job 内部的 Task 模板之间。 Dependencies []string `json:"dependencies,omitempty"` Spec *JobSpecApplyConfiguration `json:"spec,omitempty"` } diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowspec.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowspec.go index e248e81..393ba0a 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowspec.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowspec.go @@ -21,7 +21,7 @@ package v1alpha1 // with apply. type WorkflowSpecApplyConfiguration struct { JobTemplates []WorkflowJobTemplateApplyConfiguration `json:"jobTemplates,omitempty"` - Stopped *bool `json:"stopped,omitempty"` + Suspended *bool `json:"suspended,omitempty"` } // WorkflowSpecApplyConfiguration constructs a declarative configuration of the WorkflowSpec type for use with @@ -43,10 +43,10 @@ func (b *WorkflowSpecApplyConfiguration) WithJobTemplates(values ...*WorkflowJob return b } -// WithStopped sets the Stopped field in the declarative configuration to the given value +// WithSuspended sets the Suspended field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Stopped field is set to the value of the last call. -func (b *WorkflowSpecApplyConfiguration) WithStopped(value bool) *WorkflowSpecApplyConfiguration { - b.Stopped = &value +// If called multiple times, the Suspended field is set to the value of the last call. +func (b *WorkflowSpecApplyConfiguration) WithSuspended(value bool) *WorkflowSpecApplyConfiguration { + b.Suspended = &value return b } diff --git a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowstatus.go b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowstatus.go index 6f868be..50733e8 100644 --- a/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowstatus.go +++ b/api/kubeclients/applyconfiguration/rlark.io/v1alpha1/workflowstatus.go @@ -26,11 +26,15 @@ import ( // WorkflowStatusApplyConfiguration represents a declarative configuration of the WorkflowStatus type for use // with apply. type WorkflowStatusApplyConfiguration struct { - Phase *rlarkiov1alpha1.WorkflowPhase `json:"phase,omitempty"` - Jobs []WorkflowJobStatusApplyConfiguration `json:"jobs,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` - StartTime *metav1.Time `json:"startTime,omitempty"` - EndTime *metav1.Time `json:"endTime,omitempty"` + Phase *rlarkiov1alpha1.WorkflowPhase `json:"phase,omitempty"` + // ObservedGeneration 是 Workflow 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration *int64 `json:"observedGeneration,omitempty"` + Jobs []WorkflowJobStatusApplyConfiguration `json:"jobs,omitempty"` + Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` + StartTime *metav1.Time `json:"startTime,omitempty"` + EndTime *metav1.Time `json:"endTime,omitempty"` } // WorkflowStatusApplyConfiguration constructs a declarative configuration of the WorkflowStatus type for use with @@ -47,6 +51,14 @@ func (b *WorkflowStatusApplyConfiguration) WithPhase(value rlarkiov1alpha1.Workf return b } +// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ObservedGeneration field is set to the value of the last call. +func (b *WorkflowStatusApplyConfiguration) WithObservedGeneration(value int64) *WorkflowStatusApplyConfiguration { + b.ObservedGeneration = &value + return b +} + // WithJobs adds the given value to the Jobs field in the declarative configuration // and returns the receiver, so that objects can be build by chaining "With" function invocations. // If called multiple times, values provided by each call will be appended to the Jobs field. diff --git a/api/kubeclients/applyconfiguration/utils.go b/api/kubeclients/applyconfiguration/utils.go index d111805..125d68b 100644 --- a/api/kubeclients/applyconfiguration/utils.go +++ b/api/kubeclients/applyconfiguration/utils.go @@ -37,12 +37,12 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &rlarkiov1alpha1.AddonSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("AddonStatus"): return &rlarkiov1alpha1.AddonStatusApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("DockerContainerSpec"): - return &rlarkiov1alpha1.DockerContainerSpecApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("DockerTaskSpec"): - return &rlarkiov1alpha1.DockerTaskSpecApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("DockerVolumeRef"): - return &rlarkiov1alpha1.DockerVolumeRefApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("Cluster"): + return &rlarkiov1alpha1.ClusterApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ClusterSpec"): + return &rlarkiov1alpha1.ClusterSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("ClusterStatus"): + return &rlarkiov1alpha1.ClusterStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Domain"): return &rlarkiov1alpha1.DomainApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("DomainIPAllocation"): @@ -57,8 +57,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &rlarkiov1alpha1.DomainSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("DomainStatus"): return &rlarkiov1alpha1.DomainStatusApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("EnvVar"): - return &rlarkiov1alpha1.EnvVarApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Job"): return &rlarkiov1alpha1.JobApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("JobSpec"): @@ -71,10 +69,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &rlarkiov1alpha1.JobTaskStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("JobTaskTemplate"): return &rlarkiov1alpha1.JobTaskTemplateApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("KubernetesTaskSpec"): - return &rlarkiov1alpha1.KubernetesTaskSpecApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("KubernetesWorkloadSpec"): - return &rlarkiov1alpha1.KubernetesWorkloadSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Node"): return &rlarkiov1alpha1.NodeApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("NodeEvent"): @@ -95,14 +89,22 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &rlarkiov1alpha1.PodStatusApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("PullProgress"): return &rlarkiov1alpha1.PullProgressApplyConfiguration{} - case v1alpha1.SchemeGroupVersion.WithKind("RawTaskSpec"): - return &rlarkiov1alpha1.RawTaskSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Task"): return &rlarkiov1alpha1.TaskApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TaskEnvironment"): + return &rlarkiov1alpha1.TaskEnvironmentApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TaskPlacementSpec"): + return &rlarkiov1alpha1.TaskPlacementSpecApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TaskRuntimeSpec"): + return &rlarkiov1alpha1.TaskRuntimeSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("TaskSpec"): return &rlarkiov1alpha1.TaskSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("TaskStatus"): return &rlarkiov1alpha1.TaskStatusApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TaskWorkloadCarrier"): + return &rlarkiov1alpha1.TaskWorkloadCarrierApplyConfiguration{} + case v1alpha1.SchemeGroupVersion.WithKind("TaskWorkloadSpec"): + return &rlarkiov1alpha1.TaskWorkloadSpecApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("Workflow"): return &rlarkiov1alpha1.WorkflowApplyConfiguration{} case v1alpha1.SchemeGroupVersion.WithKind("WorkflowJobStatus"): diff --git a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/cluster.go b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/cluster.go new file mode 100644 index 0000000..fbc45e3 --- /dev/null +++ b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/cluster.go @@ -0,0 +1,73 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + applyconfigurationrlarkiov1alpha1 "github.com/rlinf/rlark/api/kubeclients/applyconfiguration/rlark.io/v1alpha1" + scheme "github.com/rlinf/rlark/api/kubeclients/clientset/versioned/scheme" + rlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// ClustersGetter has a method to return a ClusterInterface. +// A group's client should implement this interface. +type ClustersGetter interface { + Clusters() ClusterInterface +} + +// ClusterInterface has methods to work with Cluster resources. +type ClusterInterface interface { + Create(ctx context.Context, cluster *rlarkiov1alpha1.Cluster, opts v1.CreateOptions) (*rlarkiov1alpha1.Cluster, error) + Update(ctx context.Context, cluster *rlarkiov1alpha1.Cluster, opts v1.UpdateOptions) (*rlarkiov1alpha1.Cluster, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, cluster *rlarkiov1alpha1.Cluster, opts v1.UpdateOptions) (*rlarkiov1alpha1.Cluster, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*rlarkiov1alpha1.Cluster, error) + List(ctx context.Context, opts v1.ListOptions) (*rlarkiov1alpha1.ClusterList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *rlarkiov1alpha1.Cluster, err error) + Apply(ctx context.Context, cluster *applyconfigurationrlarkiov1alpha1.ClusterApplyConfiguration, opts v1.ApplyOptions) (result *rlarkiov1alpha1.Cluster, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, cluster *applyconfigurationrlarkiov1alpha1.ClusterApplyConfiguration, opts v1.ApplyOptions) (result *rlarkiov1alpha1.Cluster, err error) + ClusterExpansion +} + +// clusters implements ClusterInterface +type clusters struct { + *gentype.ClientWithListAndApply[*rlarkiov1alpha1.Cluster, *rlarkiov1alpha1.ClusterList, *applyconfigurationrlarkiov1alpha1.ClusterApplyConfiguration] +} + +// newClusters returns a Clusters +func newClusters(c *RlinfV1alpha1Client) *clusters { + return &clusters{ + gentype.NewClientWithListAndApply[*rlarkiov1alpha1.Cluster, *rlarkiov1alpha1.ClusterList, *applyconfigurationrlarkiov1alpha1.ClusterApplyConfiguration]( + "clusters", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *rlarkiov1alpha1.Cluster { return &rlarkiov1alpha1.Cluster{} }, + func() *rlarkiov1alpha1.ClusterList { return &rlarkiov1alpha1.ClusterList{} }, + ), + } +} diff --git a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_cluster.go b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_cluster.go new file mode 100644 index 0000000..7087ddf --- /dev/null +++ b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_cluster.go @@ -0,0 +1,50 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + rlarkiov1alpha1 "github.com/rlinf/rlark/api/kubeclients/applyconfiguration/rlark.io/v1alpha1" + typedrlarkiov1alpha1 "github.com/rlinf/rlark/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1" + v1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" + gentype "k8s.io/client-go/gentype" +) + +// fakeClusters implements ClusterInterface +type fakeClusters struct { + *gentype.FakeClientWithListAndApply[*v1alpha1.Cluster, *v1alpha1.ClusterList, *rlarkiov1alpha1.ClusterApplyConfiguration] + Fake *FakeRlinfV1alpha1 +} + +func newFakeClusters(fake *FakeRlinfV1alpha1) typedrlarkiov1alpha1.ClusterInterface { + return &fakeClusters{ + gentype.NewFakeClientWithListAndApply[*v1alpha1.Cluster, *v1alpha1.ClusterList, *rlarkiov1alpha1.ClusterApplyConfiguration]( + fake.Fake, + "", + v1alpha1.SchemeGroupVersion.WithResource("clusters"), + v1alpha1.SchemeGroupVersion.WithKind("Cluster"), + func() *v1alpha1.Cluster { return &v1alpha1.Cluster{} }, + func() *v1alpha1.ClusterList { return &v1alpha1.ClusterList{} }, + func(dst, src *v1alpha1.ClusterList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.ClusterList) []*v1alpha1.Cluster { return gentype.ToPointerSlice(list.Items) }, + func(list *v1alpha1.ClusterList, items []*v1alpha1.Cluster) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_rlark.io_client.go b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_rlark.io_client.go index 6a1bb71..cc29675 100644 --- a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_rlark.io_client.go +++ b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/fake/fake_rlark.io_client.go @@ -31,6 +31,10 @@ func (c *FakeRlinfV1alpha1) Addons(namespace string) v1alpha1.AddonInterface { return newFakeAddons(c, namespace) } +func (c *FakeRlinfV1alpha1) Clusters() v1alpha1.ClusterInterface { + return newFakeClusters(c) +} + func (c *FakeRlinfV1alpha1) Domains() v1alpha1.DomainInterface { return newFakeDomains(c) } diff --git a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/generated_expansion.go b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/generated_expansion.go index cafd7d0..5dbf2ca 100644 --- a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/generated_expansion.go +++ b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/generated_expansion.go @@ -19,6 +19,8 @@ package v1alpha1 type AddonExpansion interface{} +type ClusterExpansion interface{} + type DomainExpansion interface{} type DomainPeerExpansion interface{} diff --git a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/rlark.io_client.go b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/rlark.io_client.go index 61046f0..1946306 100644 --- a/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/rlark.io_client.go +++ b/api/kubeclients/clientset/versioned/typed/rlark.io/v1alpha1/rlark.io_client.go @@ -28,6 +28,7 @@ import ( type RlinfV1alpha1Interface interface { RESTClient() rest.Interface AddonsGetter + ClustersGetter DomainsGetter DomainPeersGetter JobsGetter @@ -46,6 +47,10 @@ func (c *RlinfV1alpha1Client) Addons(namespace string) AddonInterface { return newAddons(c, namespace) } +func (c *RlinfV1alpha1Client) Clusters() ClusterInterface { + return newClusters(c) +} + func (c *RlinfV1alpha1Client) Domains() DomainInterface { return newDomains(c) } diff --git a/api/kubeclients/informers/externalversions/generic.go b/api/kubeclients/informers/externalversions/generic.go index 2d8fb03..7a72968 100644 --- a/api/kubeclients/informers/externalversions/generic.go +++ b/api/kubeclients/informers/externalversions/generic.go @@ -54,6 +54,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource // Group=rlinf.io, Version=v1alpha1 case v1alpha1.SchemeGroupVersion.WithResource("addons"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rlinf().V1alpha1().Addons().Informer()}, nil + case v1alpha1.SchemeGroupVersion.WithResource("clusters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Rlinf().V1alpha1().Clusters().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("domains"): return &genericInformer{resource: resource.GroupResource(), informer: f.Rlinf().V1alpha1().Domains().Informer()}, nil case v1alpha1.SchemeGroupVersion.WithResource("domainpeers"): diff --git a/api/kubeclients/informers/externalversions/rlark.io/v1alpha1/cluster.go b/api/kubeclients/informers/externalversions/rlark.io/v1alpha1/cluster.go new file mode 100644 index 0000000..29949ef --- /dev/null +++ b/api/kubeclients/informers/externalversions/rlark.io/v1alpha1/cluster.go @@ -0,0 +1,114 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by informer-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + time "time" + + versioned "github.com/rlinf/rlark/api/kubeclients/clientset/versioned" + internalinterfaces "github.com/rlinf/rlark/api/kubeclients/informers/externalversions/internalinterfaces" + rlarkiov1alpha1 "github.com/rlinf/rlark/api/kubeclients/listers/rlark.io/v1alpha1" + apirlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// ClusterInformer provides access to a shared informer and lister for +// Clusters. +type ClusterInformer interface { + Informer() cache.SharedIndexInformer + Lister() rlarkiov1alpha1.ClusterLister +} + +type clusterInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewClusterInformer constructs a new informer for Cluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewClusterInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewClusterInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) +} + +// NewFilteredClusterInformer constructs a new informer for Cluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredClusterInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return NewClusterInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) +} + +// NewClusterInformerWithOptions constructs a new informer for Cluster type with additional options. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewClusterInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { + gvr := schema.GroupVersionResource{Group: "rlinf.io", Version: "v1alpha1", Resource: "clusters"} + identifier := options.InformerName.WithResource(gvr) + tweakListOptions := options.TweakListOptions + return cache.NewSharedIndexInformerWithOptions( + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ + ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&opts) + } + return client.RlinfV1alpha1().Clusters().List(context.Background(), opts) + }, + WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&opts) + } + return client.RlinfV1alpha1().Clusters().Watch(context.Background(), opts) + }, + ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&opts) + } + return client.RlinfV1alpha1().Clusters().List(ctx, opts) + }, + WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&opts) + } + return client.RlinfV1alpha1().Clusters().Watch(ctx, opts) + }, + }, client), + &apirlarkiov1alpha1.Cluster{}, + cache.SharedIndexInformerOptions{ + ResyncPeriod: options.ResyncPeriod, + Indexers: options.Indexers, + Identifier: identifier, + }, + ) +} + +func (f *clusterInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewClusterInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) +} + +func (f *clusterInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&apirlarkiov1alpha1.Cluster{}, f.defaultInformer) +} + +func (f *clusterInformer) Lister() rlarkiov1alpha1.ClusterLister { + return rlarkiov1alpha1.NewClusterLister(f.Informer().GetIndexer()) +} diff --git a/api/kubeclients/informers/externalversions/rlark.io/v1alpha1/interface.go b/api/kubeclients/informers/externalversions/rlark.io/v1alpha1/interface.go index dc8c6fe..9da48fa 100644 --- a/api/kubeclients/informers/externalversions/rlark.io/v1alpha1/interface.go +++ b/api/kubeclients/informers/externalversions/rlark.io/v1alpha1/interface.go @@ -25,6 +25,8 @@ import ( type Interface interface { // Addons returns a AddonInformer. Addons() AddonInformer + // Clusters returns a ClusterInformer. + Clusters() ClusterInformer // Domains returns a DomainInformer. Domains() DomainInformer // DomainPeers returns a DomainPeerInformer. @@ -57,6 +59,11 @@ func (v *version) Addons() AddonInformer { return &addonInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } +// Clusters returns a ClusterInformer. +func (v *version) Clusters() ClusterInformer { + return &clusterInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // Domains returns a DomainInformer. func (v *version) Domains() DomainInformer { return &domainInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/api/kubeclients/listers/rlark.io/v1alpha1/cluster.go b/api/kubeclients/listers/rlark.io/v1alpha1/cluster.go new file mode 100644 index 0000000..2be5c2b --- /dev/null +++ b/api/kubeclients/listers/rlark.io/v1alpha1/cluster.go @@ -0,0 +1,47 @@ +/* +Copyright 2024 The RLInf Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +// Code generated by lister-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + rlarkiov1alpha1 "github.com/rlinf/rlark/api/rlark.io/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" +) + +// ClusterLister helps list Clusters. +// All objects returned here must be treated as read-only. +type ClusterLister interface { + // List lists all Clusters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*rlarkiov1alpha1.Cluster, err error) + // Get retrieves the Cluster from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*rlarkiov1alpha1.Cluster, error) + ClusterListerExpansion +} + +// clusterLister implements the ClusterLister interface. +type clusterLister struct { + listers.ResourceIndexer[*rlarkiov1alpha1.Cluster] +} + +// NewClusterLister returns a new ClusterLister. +func NewClusterLister(indexer cache.Indexer) ClusterLister { + return &clusterLister{listers.New[*rlarkiov1alpha1.Cluster](indexer, rlarkiov1alpha1.Resource("cluster"))} +} diff --git a/api/kubeclients/listers/rlark.io/v1alpha1/expansion_generated.go b/api/kubeclients/listers/rlark.io/v1alpha1/expansion_generated.go index 1de4776..c67bbd4 100644 --- a/api/kubeclients/listers/rlark.io/v1alpha1/expansion_generated.go +++ b/api/kubeclients/listers/rlark.io/v1alpha1/expansion_generated.go @@ -25,6 +25,10 @@ type AddonListerExpansion interface{} // AddonNamespaceLister. type AddonNamespaceListerExpansion interface{} +// ClusterListerExpansion allows custom methods to be added to +// ClusterLister. +type ClusterListerExpansion interface{} + // DomainListerExpansion allows custom methods to be added to // DomainLister. type DomainListerExpansion interface{} diff --git a/api/rlark.io/v1alpha1/addon_types.go b/api/rlark.io/v1alpha1/addon_types.go index b4ac563..5cc992a 100644 --- a/api/rlark.io/v1alpha1/addon_types.go +++ b/api/rlark.io/v1alpha1/addon_types.go @@ -4,6 +4,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) +// AddonPhase 是 Addon 安装与升级流程的聚合阶段,由数据面 Agent 观测后上报。 +// 取值集合在 CRD Schema 层封闭,新增取值必须同步更新枚举校验与文档。 +// +kubebuilder:validation:Enum=Pending;Installing;Ready;Failed;Upgrading type AddonPhase string const ( @@ -21,9 +24,16 @@ type AddonSpec struct { } type AddonStatus struct { - Phase AddonPhase `json:"phase,omitempty"` - Version string `json:"version,omitempty"` - Message string `json:"message,omitempty"` + Phase AddonPhase `json:"phase,omitempty"` + Version string `json:"version,omitempty"` + Message string `json:"message,omitempty"` + // ObservedGeneration 是 Addon 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // Conditions 记录 Addon 的结构化状态结论,当前仅包含 ConditionTypeReady。 + // +listType=map + // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` } diff --git a/api/rlark.io/v1alpha1/annotations.go b/api/rlark.io/v1alpha1/annotations.go index 67ad28f..621f4f7 100644 --- a/api/rlark.io/v1alpha1/annotations.go +++ b/api/rlark.io/v1alpha1/annotations.go @@ -8,7 +8,4 @@ const ( RayHeadTaskNameAnnotation = "rlark.io/ray-head-task-name" RayTotalNodesAnnotation = "rlark.io/ray-total-nodes" RayNodeRankStartAnnotation = "rlark.io/ray-node-rank-start" - - RayRoleHead = "head" - RayRoleWorker = "worker" ) diff --git a/api/rlark.io/v1alpha1/cluster_types.go b/api/rlark.io/v1alpha1/cluster_types.go new file mode 100644 index 0000000..37f918b --- /dev/null +++ b/api/rlark.io/v1alpha1/cluster_types.go @@ -0,0 +1,59 @@ +package v1alpha1 + +import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + +// ClusterPhase summarizes the current lifecycle state of a data-plane cluster. +// The set is closed in the CRD schema: adding a value requires updating the +// enum marker, regenerating the CRD manifests, and updating the documentation. +// +kubebuilder:validation:Enum=Online;Offline;Downgraded;Cordoned;Draining +type ClusterPhase string + +const ( + ClusterOnline ClusterPhase = "Online" + ClusterOffline ClusterPhase = "Offline" + ClusterDowngraded ClusterPhase = "Downgraded" + ClusterCordoned ClusterPhase = "Cordoned" + ClusterDraining ClusterPhase = "Draining" +) + +// ClusterSpec declares the durable operational state of a data-plane cluster. +type ClusterSpec struct { + // AgentNamespace is the management-plane namespace that contains the agent heartbeat Lease and Node CRs. + AgentNamespace string `json:"agentNamespace"` + Cordoned bool `json:"cordoned,omitempty"` + Draining bool `json:"draining,omitempty"` +} + +// ClusterStatus reports the controller's current observation of a data-plane cluster. +type ClusterStatus struct { + Phase ClusterPhase `json:"phase,omitempty"` + LastHeartbeatTime *metav1.Time `json:"lastHeartbeatTime,omitempty"` + TotalNodes int32 `json:"totalNodes,omitempty"` + OnlineNodes int32 `json:"onlineNodes,omitempty"` + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty"` +} + +// +genclient +// +genclient:nonNamespaced +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:path=clusters,scope=Cluster,shortName=rlcluster +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +// +kubebuilder:printcolumn:name="Online",type=integer,JSONPath=`.status.onlineNodes` +// +kubebuilder:printcolumn:name="Total",type=integer,JSONPath=`.status.totalNodes` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` +type Cluster struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + Spec ClusterSpec `json:"spec,omitempty"` + Status ClusterStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true +type ClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []Cluster `json:"items"` +} diff --git a/api/rlark.io/v1alpha1/conditions.go b/api/rlark.io/v1alpha1/conditions.go new file mode 100644 index 0000000..b515005 --- /dev/null +++ b/api/rlark.io/v1alpha1/conditions.go @@ -0,0 +1,35 @@ +package v1alpha1 + +// 本文件集中定义 RLark 各资源 Status.Conditions 共用的 Condition Type 常量。 +// +// 约定: +// - Conditions 使用 metav1.Condition,并以 Type 作为列表主键 +// (`+listType=map` / `+listMapKey=type`),同一 Type 在列表中至多出现一次。 +// - 写入方必须通过 apimeta.SetStatusCondition 更新,以便正确维护 +// LastTransitionTime 语义。 +// - Spec 驱动的 Condition 必须填写 ObservedGeneration(取写入时的 +// metadata.generation)。metav1.Condition 自带的 per-condition +// ObservedGeneration 是控制器契约而非 API Server 保证:消费者需要据此 +// 判断该 Condition 是否仍对应当前 Spec。 +// - Reason 为资源与场景特有,不在此集中定义;它必须是 +// CamelCase、取值稳定、可被程序消费的短标识。 +// - 新增 Condition Type 必须在此声明,并同步更新中英文文档,避免各实现包 +// 重复定义同名字符串而语义漂移。 +const ( + // ConditionTypeValidated 表示控制器对资源 Spec 的校验结论。 + // Status=False 表示 Spec 非法且不会被继续调谐,Reason 给出具体原因。 + // 该 Condition 由 Spec 驱动,写入方必须填写 ObservedGeneration。 + // 当前写入方:控制面 Job / Workflow / Domain 控制器。 + ConditionTypeValidated = "Validated" + + // ConditionTypeProgressing 表示资源正在向期望状态推进的中间过程。 + // Status=True 表示仍在推进中,Reason 给出当前推进的具体动作。 + // 当前写入方:数据面 Task 控制器(工作负载类型迁移)。 + ConditionTypeProgressing = "Progressing" + + // ConditionTypeReady 表示资源当前是否处于可用状态,是 Phase 的结构化补充: + // Phase 给出聚合阶段,Ready 给出“是否可用”这一布尔结论及其机器可读原因。 + // 该 Condition 由观测驱动(而非 Spec 驱动),因此不保证填写 ObservedGeneration。 + // 当前写入方:数据面 Node 控制器、数据面 Addon 控制器。 + ConditionTypeReady = "Ready" +) diff --git a/api/rlark.io/v1alpha1/consts.go b/api/rlark.io/v1alpha1/consts.go new file mode 100644 index 0000000..f58368b --- /dev/null +++ b/api/rlark.io/v1alpha1/consts.go @@ -0,0 +1,16 @@ +package v1alpha1 + +const ( + TaskRoleActor = "Actor" + TaskRoleRollout = "Rollout" + TaskRoleEnv = "Env" +) + +const ( + RayRoleHead = "head" + RayRoleWorker = "worker" +) + +const ( + RuntimeKindKubernetes = "Kubernetes" +) diff --git a/api/rlark.io/v1alpha1/domain_peer_types.go b/api/rlark.io/v1alpha1/domain_peer_types.go index 23c4002..0773eeb 100644 --- a/api/rlark.io/v1alpha1/domain_peer_types.go +++ b/api/rlark.io/v1alpha1/domain_peer_types.go @@ -6,7 +6,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:path=domainpeers,scope=Namespaced,shortName=rldpeer -// +kubebuilder:printcolumn:name="Domain",type=string,JSONPath=`.spec.domain` +// +kubebuilder:printcolumn:name="PrefixLen",type=integer,JSONPath=`.spec.prefixLen` // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` type DomainPeer struct { metav1.TypeMeta `json:",inline"` diff --git a/api/rlark.io/v1alpha1/domain_types.go b/api/rlark.io/v1alpha1/domain_types.go index 2f312c5..468b943 100644 --- a/api/rlark.io/v1alpha1/domain_types.go +++ b/api/rlark.io/v1alpha1/domain_types.go @@ -7,6 +7,7 @@ import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:path=domains,scope=Cluster,shortName=rldomain +// +kubebuilder:printcolumn:name="CIDR",type=string,JSONPath=`.spec.cidr` // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` type Domain struct { metav1.TypeMeta `json:",inline"` @@ -27,6 +28,17 @@ type DomainIPAllocation struct { } type DomainStatus struct { + // ObservedGeneration 是 Domain 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在依据 + // ipAllocations 做判断前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // Conditions 记录 Domain 的结构化状态结论,当前仅包含 ConditionTypeValidated + // (Spec.CIDR 是否合法)。它由 Spec 驱动,写入方必须填写 ObservedGeneration。 + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty"` + // IPAllocations 由 Domain 控制器独占写入,其它组件不得修改。该列表规模随 + // Domain CIDR 增长(/16 可达数万条)。 IPAllocations []DomainIPAllocation `json:"ipAllocations,omitempty"` } diff --git a/api/rlark.io/v1alpha1/groupversion_info.go b/api/rlark.io/v1alpha1/groupversion_info.go index 7619f91..bdf9e33 100644 --- a/api/rlark.io/v1alpha1/groupversion_info.go +++ b/api/rlark.io/v1alpha1/groupversion_info.go @@ -30,6 +30,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Domain{}, &DomainList{}, + &Cluster{}, + &ClusterList{}, &DomainPeer{}, &DomainPeerList{}, diff --git a/api/rlark.io/v1alpha1/job_types.go b/api/rlark.io/v1alpha1/job_types.go index a4bd2fc..0cf12c2 100644 --- a/api/rlark.io/v1alpha1/job_types.go +++ b/api/rlark.io/v1alpha1/job_types.go @@ -2,6 +2,9 @@ package v1alpha1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +// JobPhase 是 Job 的聚合生命周期阶段,由控制面 Job 控制器根据其 Task 的 +// 观测状态推导得出。取值集合必须与 Job 状态机保持一致。 +// +kubebuilder:validation:Enum=Pending;Running;Succeeded;Failed;Stopped type JobPhase string const ( @@ -19,16 +22,17 @@ type JobTaskTemplate struct { } // JobTag 表示一个任务标签,由 key 和多个 value 组成。 -// key 和每个 value 长度均不超过 10 个字符;一个任务最多 10 个标签; -// 每个标签最多包含 10 个不同的 value。 +// 标签的个数与 key/value 长度上限不在 CRD Schema 层封闭,由 Gateway 在写入 +// 路径上校验,详见开发者文档的 API 约定。 type JobTag struct { Key string `json:"key"` Values []string `json:"values"` } type JobSpec struct { - Domain string `json:"domain,omitempty"` - Stopped bool `json:"stopped,omitempty"` + Domain string `json:"domain,omitempty"` + // Setting spec.suspended to true starts an orderly stop without deleting the Job resource. The Job becomes Stopped and is archived into the persistence backend after ArchiveTTL (default 5 minutes), while the Job CR is deleted from kcp. Starting the Job via POST /jobs/:name/start restores it from the persistence backend with the same name and spec but a new Kubernetes UID. + Suspended bool `json:"suspended,omitempty"` Tasks []JobTaskTemplate `json:"tasks,omitempty"` SSHPublicKey string `json:"sshPublicKey,omitempty"` Tags []JobTag `json:"tags,omitempty"` @@ -45,8 +49,14 @@ func (s *JobTaskStatus) SetPhase(p string) { s.Phase = TaskPhase(p) } func (s *JobTaskStatus) SetMessage(m string) { s.Message = m } type JobStatus struct { - Phase JobPhase `json:"phase,omitempty"` - Tasks []JobTaskStatus `json:"tasks,omitempty"` + Phase JobPhase `json:"phase,omitempty"` + // ObservedGeneration 是 Job 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + Tasks []JobTaskStatus `json:"tasks,omitempty"` + // +listType=map + // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` EndTime *metav1.Time `json:"endTime,omitempty"` diff --git a/api/rlark.io/v1alpha1/node_types.go b/api/rlark.io/v1alpha1/node_types.go index 1847795..b7074e4 100644 --- a/api/rlark.io/v1alpha1/node_types.go +++ b/api/rlark.io/v1alpha1/node_types.go @@ -11,6 +11,9 @@ const ( LabelNodeCategory = "rlark.io/node-category" ) +// NodeCategory 是节点形态分类。它只作为 LabelNodeCategory 的取值使用, +// 不是任何资源字段的类型,因此无法在 CRD Schema 层做枚举校验; +// 取值由 Gateway 在读取 Label 时解析并过滤。 type NodeCategory string const ( @@ -19,6 +22,7 @@ const ( NodeCategoryRobot NodeCategory = "robot" // 端真机节点 ) +// NodePhase 是节点连通性阶段,由数据面 node-agent 通过心跳探测后上报。 type NodePhase string const ( @@ -26,6 +30,7 @@ const ( NodeOffline NodePhase = "Offline" ) +// +kubebuilder:validation:Enum=Kubernetes;Docker;Raw type AgentType string // 目前支持三种 Agent @@ -48,19 +53,39 @@ type NodeStorageStatus struct { } type NodeStatus struct { - Phase NodePhase `json:"phase,omitempty"` - Reason string `json:"reason,omitempty"` - NodeInfo NodeInfo `json:"nodeInfo,omitempty"` + // Phase 是节点连通性聚合阶段,由数据面 node-agent 上报。 + // +kubebuilder:validation:Enum=Online;Offline + Phase NodePhase `json:"phase,omitempty"` + // Reason 是 Phase 的机器可读原因(CamelCase),与 Conditions 中 + // ConditionTypeReady 的 Reason 同源,供列表视图直接展示。 + // 该字段与 Conditions 均由数据面 node-agent 独占写入。 + Reason string `json:"reason,omitempty"` + // Conditions 记录节点的结构化状态结论,当前仅包含 ConditionTypeReady。 + // 它由观测(而非 Spec)驱动,因此不填写 ObservedGeneration。 + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty"` + // LastHeartbeatTime 是控制面 Node Reconciler 从 Agent Lease 读取到的最近一次 + // 心跳续约时间;数据面不写入本字段。 + LastHeartbeatTime *metav1.Time `json:"lastHeartbeatTime,omitempty"` + // LastStatusChangeTime 是 Phase 最近一次发生变化的时间,与 LastHeartbeatTime + // 同由控制面 Node Reconciler 写入,用于区分「长时间保持同一状态」与「刚刚翻转」。 + LastStatusChangeTime *metav1.Time `json:"lastStatusChangeTime,omitempty"` + // NodeInfo 是节点基础信息,由数据面 Agent 上报;控制面不写入本字段。 + NodeInfo NodeInfo `json:"nodeInfo,omitempty"` + // Addresses 是节点地址列表(InternalIP / Hostname 等)。 Addresses []corev1.NodeAddress `json:"addresses,omitempty"` DiskPressure *bool `json:"diskPressure,omitempty"` Storage *NodeStorageStatus `json:"storage,omitempty"` Allocatable corev1.ResourceList `json:"allocatable,omitempty"` // 需要预留系统组件 agent Capacity corev1.ResourceList `json:"capacity,omitempty"` Used corev1.ResourceList `json:"used,omitempty"` - PullProgress []PullProgress `json:"pullProgress,omitempty"` + // PullProgress 是节点上正在进行的镜像拉取进度,由 node-agent 上报。 + PullProgress []PullProgress `json:"pullProgress,omitempty"` // Events 由数据面 node-agent 上报节点相关 Kubernetes Event(如 DiskPressure // 等 Warning 事件及镜像拉取/调度相关事件)。控制面 Task reconciler 在 Task // 处于 Pending 期间聚合各节点事件到 Task.status.events,供前端展示。 + // 条目数量由 node-agent 侧裁剪(最多保留 50 条)。 Events []NodeEvent `json:"events,omitempty"` } @@ -100,6 +125,10 @@ type NodeInfo struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:path=nodes,scope=Namespaced,shortName=rlnode +// +kubebuilder:printcolumn:name="Agent",type=string,JSONPath=`.spec.agentType` +// +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +// +kubebuilder:printcolumn:name="Unschedulable",type=boolean,JSONPath=`.spec.unschedulable` +// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` type Node struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` diff --git a/api/rlark.io/v1alpha1/pod_types.go b/api/rlark.io/v1alpha1/pod_types.go index aa4a465..af1699d 100644 --- a/api/rlark.io/v1alpha1/pod_types.go +++ b/api/rlark.io/v1alpha1/pod_types.go @@ -46,7 +46,7 @@ type PodStatus struct { // +kubebuilder:subresource:status // +kubebuilder:resource:path=pods,scope=Namespaced,shortName=rlpod // +kubebuilder:printcolumn:name="Domain",type=string,JSONPath=`.spec.domain` -// +kubebuilder:printcolumn:name="Node",type=string,JSONPath=`.spec.node` +// +kubebuilder:printcolumn:name="Node",type=string,JSONPath=`.status.node` // +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` type Pod struct { diff --git a/api/rlark.io/v1alpha1/task_types.go b/api/rlark.io/v1alpha1/task_types.go index 0211db2..213d7fd 100644 --- a/api/rlark.io/v1alpha1/task_types.go +++ b/api/rlark.io/v1alpha1/task_types.go @@ -2,98 +2,106 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -type TaskPhase string - -const ( - TaskPhasePending TaskPhase = "Pending" - TaskPhaseRunning TaskPhase = "Running" - TaskPhaseSucceeded TaskPhase = "Succeeded" - TaskPhaseFailed TaskPhase = "Failed" - TaskPhaseStopped TaskPhase = "Stopped" -) - -type KubernetesTaskSpec struct { - Workload *KubernetesWorkloadSpec `json:"workload,omitempty"` -} - -type KubernetesWorkloadKind string - -const ( - KubernetesWorkloadDeployment KubernetesWorkloadKind = "Deployment" - KubernetesWorkloadDaemonSet KubernetesWorkloadKind = "DaemonSet" - KubernetesWorkloadStatefulSet KubernetesWorkloadKind = "StatefulSet" - KubernetesWorkloadCloneSet KubernetesWorkloadKind = "CloneSet" -) - +// TaskRole 描述 Task 在业务编排中的角色,用于前端分组与展示。 +// 该字段当前不在 CRD 层做枚举校验:它可能承载上层编排框架的自定义角色名, +// 收窄取值会阻止合法的既有数据写入。请勿据此推断取值的封闭集合。 type TaskRole string -const ( - TaskRoleActor TaskRole = "Actor" - TaskRoleRollout TaskRole = "Rollout" - TaskRoleEnv TaskRole = "Env" -) - -type KubernetesWorkloadSpec struct { - Kind KubernetesWorkloadKind `json:"kind,omitempty"` - Replicas *int32 `json:"replicas,omitempty"` - Template corev1.PodTemplateSpec `json:"template,omitempty"` - // Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.StorageClassName instead. - PvcStorageMap map[string]string `json:"pvcStorageMap,omitempty"` - // Deprecated: use Template.Spec.Volumes[].Ephemeral.VolumeClaimTemplate.Spec.Resources.Requests instead. - PvcSizeGbMap map[string]int32 `json:"pvcSizeGbMap,omitempty"` +// TaskPlacementSpec describes scheduling constraints for the workload. +type TaskPlacementSpec struct { + NodeSelector map[string]string `json:"nodeSelector,omitempty"` } -type DockerTaskSpec struct { - Containers []DockerContainerSpec `json:"containers,omitempty"` +// RuntimeKind 表示负责执行 Task 工作负载的 Runtime 类型。 +// CRD 有意不限制该字符串的枚举值,使 Docker、Raw 等 Runtime 可以在不修改 +// Task Schema 的情况下扩展。Agent 必须在产生任何外部副作用前,通过已注册的 +// Provider 和能力校验拒绝未知或尚未支持的 Runtime 类型。 +type RuntimeKind string + +// TaskRuntimeSpec selects the runtime implementation and instance that lowers +// the common Pod template. Name is a stable runtime instance identifier; it is +// not a display name or proof of ownership. +type TaskRuntimeSpec struct { + Kind RuntimeKind `json:"kind"` + Name string `json:"name,omitempty"` } -type RawTaskSpec struct { - Artifact string `json:"artifact,omitempty"` - Entrypoint []string `json:"entrypoint,omitempty"` - Environment []EnvVar `json:"environment,omitempty"` +// WorkloadKind identifies the workload semantics independently of its Runtime +// carrier. The CRD deliberately keeps this identifier open; registered +// Adapters must reject unsupported kinds before producing external effects. +type WorkloadKind string + +// TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a +// workload. Type and Version identify a carrier contract; Parameters remain +// opaque until the selected Adapter or Runtime implementation strictly decodes +// them. Carrier identifiers are open strings, not CRD enums. +type TaskWorkloadCarrier struct { + Type string `json:"type"` + Version string `json:"version"` + Parameters apiextensionsv1.JSON `json:"parameters,omitempty"` } -type DockerContainerSpec struct { - Name string `json:"name,omitempty"` - Image string `json:"image,omitempty"` - Command []string `json:"command,omitempty"` - Args []string `json:"args,omitempty"` - Environment []EnvVar `json:"environment,omitempty"` - Volumes []DockerVolumeRef `json:"volumes,omitempty"` +// TaskEnvironment 表示 Task 请求的一种可扩展环境能力。 +// Type 是带所有者作用域的稳定类型标识,Version 表示该类型的参数版本。 +// Parameters 必须由对应的已注册 Handler 严格解码和校验;未知类型、未知版本或 +// 非法参数必须在产生任何外部副作用前被拒绝。 +type TaskEnvironment struct { + Type string `json:"type"` + Version string `json:"version"` + Parameters apiextensionsv1.JSON `json:"parameters,omitempty"` } -type DockerVolumeRef struct { - Source string `json:"source,omitempty"` - Target string `json:"target,omitempty"` +// TaskWorkloadSpec is the common workload declaration for every runtime. +// Kubernetes applies the Pod template natively. Future Docker and Raw providers +// lower the subset they support and reject unsupported fields before producing +// external effects. +type TaskWorkloadSpec struct { + Kind WorkloadKind `json:"kind,omitempty"` + Version string `json:"version"` + Parameters apiextensionsv1.JSON `json:"parameters,omitempty"` + Carrier TaskWorkloadCarrier `json:"carrier"` + Template *corev1.PodTemplateSpec `json:"template,omitempty"` } -type EnvVar struct { - Name string `json:"name,omitempty"` - Value string `json:"value,omitempty"` -} +// TaskPhase 是单个 Task 的生命周期阶段,由数据面 Agent 观测本地工作负载后上报。 +// 取值集合与 JobPhase 对齐,Task 没有独立的 Stopping 中间态。 +// +kubebuilder:validation:Enum=Pending;Running;Succeeded;Failed;Stopped +type TaskPhase string + +const ( + TaskPhasePending TaskPhase = "Pending" + TaskPhaseRunning TaskPhase = "Running" + TaskPhaseSucceeded TaskPhase = "Succeeded" + TaskPhaseFailed TaskPhase = "Failed" + TaskPhaseStopped TaskPhase = "Stopped" +) type TaskSpec struct { - AgentType AgentType `json:"agentType,omitempty"` - Role TaskRole `json:"role"` - Domain string `json:"domain,omitempty"` // 所属 Domain 名称,从 Job 继承 - DownstreamName string `json:"downstreamName,omitempty"` - NodeSelector map[string]string `json:"nodeSelector,omitempty"` // value 可以是 ',' 分隔的多个值 - Kubernetes *KubernetesTaskSpec `json:"kubernetes,omitempty"` - Docker *DockerTaskSpec `json:"docker,omitempty"` - Raw *RawTaskSpec `json:"raw,omitempty"` - TensorBoardDir *string `json:"tensorBoardDir,omitempty"` - PrepareScript string `json:"prepareScript,omitempty"` // Ray 集群启动前执行的脚本 - RunScript string `json:"runScript,omitempty"` // Ray 集群就绪后执行的脚本(仅 head 节点) - SSHPublicKey string `json:"sshPublicKey,omitempty"` // 注入到 Pod authorized_keys 的 SSH 公钥 - Tags []JobTag `json:"tags,omitempty"` + Role TaskRole `json:"role"` + DownstreamName string `json:"downstreamName,omitempty"` + Suspended bool `json:"suspended,omitempty"` + Placement TaskPlacementSpec `json:"placement"` + Runtime TaskRuntimeSpec `json:"runtime"` + Workload TaskWorkloadSpec `json:"workload"` + Environments []TaskEnvironment `json:"environments,omitempty"` + Tags []JobTag `json:"tags,omitempty"` } type TaskStatus struct { - Phase TaskPhase `json:"phase,omitempty"` - ObservedNodes []string `json:"observedNodes,omitempty"` + Phase TaskPhase `json:"phase,omitempty"` + // ObservedGeneration 是数据面 Agent 最近一次完成本地工作负载调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / message / observedNodes 之前,应比较本字段与 metadata.generation + // 以识别过期状态。 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + // ObservedNodes 是当前承载该 Task 工作负载的节点名,由数据面 Agent 排序去重后上报。 + ObservedNodes []string `json:"observedNodes,omitempty"` + // +listType=map + // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty"` StartTime *metav1.Time `json:"startTime,omitempty"` CompletionTime *metav1.Time `json:"completionTime,omitempty"` @@ -114,7 +122,8 @@ type TaskStatus struct { // +kubebuilder:object:root=true // +kubebuilder:subresource:status // +kubebuilder:resource:path=tasks,scope=Namespaced,shortName=task -// +kubebuilder:printcolumn:name="Agent",type=string,JSONPath=`.spec.agentType` +// +kubebuilder:printcolumn:name="Runtime",type=string,JSONPath=`.spec.runtime.kind` +// +kubebuilder:printcolumn:name="Workload",type=string,JSONPath=`.spec.workload.kind` // +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` // +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp` type Task struct { diff --git a/api/rlark.io/v1alpha1/types_test.go b/api/rlark.io/v1alpha1/types_test.go index 4675c8b..81d93f7 100644 --- a/api/rlark.io/v1alpha1/types_test.go +++ b/api/rlark.io/v1alpha1/types_test.go @@ -5,13 +5,13 @@ import ( "testing" ) -func TestWorkflowStoppedJSON(t *testing.T) { - wf := Workflow{Spec: WorkflowSpec{Stopped: true}} +func TestWorkflowSuspendedJSON(t *testing.T) { + wf := Workflow{Spec: WorkflowSpec{Suspended: true}} data, err := json.Marshal(wf) if err != nil { t.Fatal(err) } - if string(data) != `{"metadata":{},"spec":{"stopped":true},"status":{}}` { + if string(data) != `{"metadata":{},"spec":{"suspended":true},"status":{}}` { t.Fatalf("unexpected JSON: %s", data) } @@ -19,8 +19,8 @@ func TestWorkflowStoppedJSON(t *testing.T) { if err := json.Unmarshal(data, &decoded); err != nil { t.Fatal(err) } - if !decoded.Spec.Stopped { - t.Fatal("spec.stopped was not preserved") + if !decoded.Spec.Suspended { + t.Fatal("spec.suspended was not preserved") } } diff --git a/api/rlark.io/v1alpha1/workflow_types.go b/api/rlark.io/v1alpha1/workflow_types.go index d0c9273..7f9ffed 100644 --- a/api/rlark.io/v1alpha1/workflow_types.go +++ b/api/rlark.io/v1alpha1/workflow_types.go @@ -15,14 +15,16 @@ const ( ) type WorkflowJobTemplate struct { - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty"` + // Dependencies 是同一 Workflow 内其它 Job 模板的名字,依赖关系只存在于 + // Job 之间,不存在于 Job 内部的 Task 模板之间。 Dependencies []string `json:"dependencies,omitempty"` Spec JobSpec `json:"spec,omitempty"` } type WorkflowSpec struct { JobTemplates []WorkflowJobTemplate `json:"jobTemplates,omitempty"` - Stopped bool `json:"stopped,omitempty"` + Suspended bool `json:"suspended,omitempty"` } type WorkflowJobStatus struct { @@ -36,11 +38,17 @@ func (s *WorkflowJobStatus) SetPhase(p string) { s.Phase = JobPhase(p) } func (s *WorkflowJobStatus) SetMessage(m string) { s.Message = m } type WorkflowStatus struct { - Phase WorkflowPhase `json:"phase,omitempty"` - Jobs []WorkflowJobStatus `json:"jobs,omitempty"` - Conditions []metav1.Condition `json:"conditions,omitempty"` - StartTime *metav1.Time `json:"startTime,omitempty"` - EndTime *metav1.Time `json:"endTime,omitempty"` + Phase WorkflowPhase `json:"phase,omitempty"` + // ObservedGeneration 是 Workflow 控制器最近一次完成调谐时所观测到的 + // metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + // phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + ObservedGeneration int64 `json:"observedGeneration,omitempty"` + Jobs []WorkflowJobStatus `json:"jobs,omitempty"` + // +listType=map + // +listMapKey=type + Conditions []metav1.Condition `json:"conditions,omitempty"` + StartTime *metav1.Time `json:"startTime,omitempty"` + EndTime *metav1.Time `json:"endTime,omitempty"` } // +genclient diff --git a/api/rlark.io/v1alpha1/zz_generated.deepcopy.go b/api/rlark.io/v1alpha1/zz_generated.deepcopy.go index d8a3da6..c0a96b1 100644 --- a/api/rlark.io/v1alpha1/zz_generated.deepcopy.go +++ b/api/rlark.io/v1alpha1/zz_generated.deepcopy.go @@ -114,73 +114,101 @@ func (in *AddonStatus) DeepCopy() *AddonStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerContainerSpec) DeepCopyInto(out *DockerContainerSpec) { +func (in *Cluster) DeepCopyInto(out *Cluster) { *out = *in - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Environment != nil { - in, out := &in.Environment, &out.Environment - *out = make([]EnvVar, len(*in)) - copy(*out, *in) - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]DockerVolumeRef, len(*in)) - copy(*out, *in) - } + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerContainerSpec. -func (in *DockerContainerSpec) DeepCopy() *DockerContainerSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster. +func (in *Cluster) DeepCopy() *Cluster { if in == nil { return nil } - out := new(DockerContainerSpec) + out := new(Cluster) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *Cluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerTaskSpec) DeepCopyInto(out *DockerTaskSpec) { +func (in *ClusterList) DeepCopyInto(out *ClusterList) { *out = *in - if in.Containers != nil { - in, out := &in.Containers, &out.Containers - *out = make([]DockerContainerSpec, len(*in)) + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Cluster, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerTaskSpec. -func (in *DockerTaskSpec) DeepCopy() *DockerTaskSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList. +func (in *ClusterList) DeepCopy() *ClusterList { if in == nil { return nil } - out := new(DockerTaskSpec) + out := new(ClusterList) in.DeepCopyInto(out) return out } +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *ClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerVolumeRef) DeepCopyInto(out *DockerVolumeRef) { +func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerVolumeRef. -func (in *DockerVolumeRef) DeepCopy() *DockerVolumeRef { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec. +func (in *ClusterSpec) DeepCopy() *ClusterSpec { if in == nil { return nil } - out := new(DockerVolumeRef) + out := new(ClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus) { + *out = *in + if in.LastHeartbeatTime != nil { + in, out := &in.LastHeartbeatTime, &out.LastHeartbeatTime + *out = (*in).DeepCopy() + } + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus. +func (in *ClusterStatus) DeepCopy() *ClusterStatus { + if in == nil { + return nil + } + out := new(ClusterStatus) in.DeepCopyInto(out) return out } @@ -386,6 +414,13 @@ func (in *DomainSpec) DeepCopy() *DomainSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DomainStatus) DeepCopyInto(out *DomainStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.IPAllocations != nil { in, out := &in.IPAllocations, &out.IPAllocations *out = make([]DomainIPAllocation, len(*in)) @@ -403,21 +438,6 @@ func (in *DomainStatus) DeepCopy() *DomainStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVar) DeepCopyInto(out *EnvVar) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar. -func (in *EnvVar) DeepCopy() *EnvVar { - if in == nil { - return nil - } - out := new(EnvVar) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Job) DeepCopyInto(out *Job) { *out = *in @@ -592,61 +612,6 @@ func (in *JobTaskTemplate) DeepCopy() *JobTaskTemplate { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesTaskSpec) DeepCopyInto(out *KubernetesTaskSpec) { - *out = *in - if in.Workload != nil { - in, out := &in.Workload, &out.Workload - *out = new(KubernetesWorkloadSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesTaskSpec. -func (in *KubernetesTaskSpec) DeepCopy() *KubernetesTaskSpec { - if in == nil { - return nil - } - out := new(KubernetesTaskSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesWorkloadSpec) DeepCopyInto(out *KubernetesWorkloadSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - in.Template.DeepCopyInto(&out.Template) - if in.PvcStorageMap != nil { - in, out := &in.PvcStorageMap, &out.PvcStorageMap - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.PvcSizeGbMap != nil { - in, out := &in.PvcSizeGbMap, &out.PvcSizeGbMap - *out = make(map[string]int32, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesWorkloadSpec. -func (in *KubernetesWorkloadSpec) DeepCopy() *KubernetesWorkloadSpec { - if in == nil { - return nil - } - out := new(KubernetesWorkloadSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Node) DeepCopyInto(out *Node) { *out = *in @@ -755,6 +720,21 @@ func (in *NodeSpec) DeepCopy() *NodeSpec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.LastHeartbeatTime != nil { + in, out := &in.LastHeartbeatTime, &out.LastHeartbeatTime + *out = (*in).DeepCopy() + } + if in.LastStatusChangeTime != nil { + in, out := &in.LastStatusChangeTime, &out.LastStatusChangeTime + *out = (*in).DeepCopy() + } out.NodeInfo = in.NodeInfo if in.Addresses != nil { in, out := &in.Addresses, &out.Addresses @@ -935,31 +915,6 @@ func (in *PullProgress) DeepCopy() *PullProgress { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RawTaskSpec) DeepCopyInto(out *RawTaskSpec) { - *out = *in - if in.Entrypoint != nil { - in, out := &in.Entrypoint, &out.Entrypoint - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Environment != nil { - in, out := &in.Environment, &out.Environment - *out = make([]EnvVar, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawTaskSpec. -func (in *RawTaskSpec) DeepCopy() *RawTaskSpec { - if in == nil { - return nil - } - out := new(RawTaskSpec) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Task) DeepCopyInto(out *Task) { *out = *in @@ -987,6 +942,22 @@ func (in *Task) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskEnvironment) DeepCopyInto(out *TaskEnvironment) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskEnvironment. +func (in *TaskEnvironment) DeepCopy() *TaskEnvironment { + if in == nil { + return nil + } + out := new(TaskEnvironment) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TaskList) DeepCopyInto(out *TaskList) { *out = *in @@ -1020,7 +991,7 @@ func (in *TaskList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TaskSpec) DeepCopyInto(out *TaskSpec) { +func (in *TaskPlacementSpec) DeepCopyInto(out *TaskPlacementSpec) { *out = *in if in.NodeSelector != nil { in, out := &in.NodeSelector, &out.NodeSelector @@ -1029,25 +1000,45 @@ func (in *TaskSpec) DeepCopyInto(out *TaskSpec) { (*out)[key] = val } } - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(KubernetesTaskSpec) - (*in).DeepCopyInto(*out) - } - if in.Docker != nil { - in, out := &in.Docker, &out.Docker - *out = new(DockerTaskSpec) - (*in).DeepCopyInto(*out) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskPlacementSpec. +func (in *TaskPlacementSpec) DeepCopy() *TaskPlacementSpec { + if in == nil { + return nil } - if in.Raw != nil { - in, out := &in.Raw, &out.Raw - *out = new(RawTaskSpec) - (*in).DeepCopyInto(*out) + out := new(TaskPlacementSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskRuntimeSpec) DeepCopyInto(out *TaskRuntimeSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRuntimeSpec. +func (in *TaskRuntimeSpec) DeepCopy() *TaskRuntimeSpec { + if in == nil { + return nil } - if in.TensorBoardDir != nil { - in, out := &in.TensorBoardDir, &out.TensorBoardDir - *out = new(string) - **out = **in + out := new(TaskRuntimeSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskSpec) DeepCopyInto(out *TaskSpec) { + *out = *in + in.Placement.DeepCopyInto(&out.Placement) + out.Runtime = in.Runtime + in.Workload.DeepCopyInto(&out.Workload) + if in.Environments != nil { + in, out := &in.Environments, &out.Environments + *out = make([]TaskEnvironment, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } if in.Tags != nil { in, out := &in.Tags, &out.Tags @@ -1115,6 +1106,44 @@ func (in *TaskStatus) DeepCopy() *TaskStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskWorkloadCarrier) DeepCopyInto(out *TaskWorkloadCarrier) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskWorkloadCarrier. +func (in *TaskWorkloadCarrier) DeepCopy() *TaskWorkloadCarrier { + if in == nil { + return nil + } + out := new(TaskWorkloadCarrier) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TaskWorkloadSpec) DeepCopyInto(out *TaskWorkloadSpec) { + *out = *in + in.Parameters.DeepCopyInto(&out.Parameters) + in.Carrier.DeepCopyInto(&out.Carrier) + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(corev1.PodTemplateSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskWorkloadSpec. +func (in *TaskWorkloadSpec) DeepCopy() *TaskWorkloadSpec { + if in == nil { + return nil + } + out := new(TaskWorkloadSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Workflow) DeepCopyInto(out *Workflow) { *out = *in diff --git a/apps/rlark-ui/.prettierignore b/apps/rlark-ui/.prettierignore index 0371bb3..e203099 100644 --- a/apps/rlark-ui/.prettierignore +++ b/apps/rlark-ui/.prettierignore @@ -1 +1,2 @@ -public/china-provinces.geojson \ No newline at end of file +public/china-provinces.geojson +src/generated/rlark/ diff --git a/apps/rlark-ui/Makefile b/apps/rlark-ui/Makefile index 1f24fbd..a2f3ccb 100644 --- a/apps/rlark-ui/Makefile +++ b/apps/rlark-ui/Makefile @@ -8,7 +8,7 @@ BASE_IMAGE ?= nginx:1.29.1 ##@ Build -.PHONY: install build lint fmt +.PHONY: install build lint fmt generate-crd-models install: ## Install npm dependencies npm install @@ -19,7 +19,10 @@ lint: install ## Lint TypeScript/React (eslint) npx eslint src/ fmt: ## Format code (prettier) - ./node_modules/.bin/prettier --write 'src/' 'index.html' 'package.json' 'vite.config.ts' 'tsconfig*.json' + ./node_modules/.bin/prettier --write 'src/' 'scripts/' 'index.html' 'package.json' 'vite.config.ts' 'tsconfig*.json' --ignore-path .prettierignore + +generate-crd-models: ## Generate TypeScript models from the checked-in CRD manifests + npm run generate:crd-models ##@ Docker diff --git a/apps/rlark-ui/eslint.config.js b/apps/rlark-ui/eslint.config.js index 41ba997..f60012f 100644 --- a/apps/rlark-ui/eslint.config.js +++ b/apps/rlark-ui/eslint.config.js @@ -4,7 +4,7 @@ import reactHooks from "eslint-plugin-react-hooks"; import reactRefresh from "eslint-plugin-react-refresh"; export default tseslint.config( - { ignores: ["public", "dist"] }, + { ignores: ["public", "dist", "src/generated/rlark"] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ["**/*.{ts,tsx}"], diff --git a/apps/rlark-ui/package-lock.json b/apps/rlark-ui/package-lock.json index 6750142..743d31f 100644 --- a/apps/rlark-ui/package-lock.json +++ b/apps/rlark-ui/package-lock.json @@ -16,6 +16,9 @@ "linux" ], "dependencies": { + "@kubernetes-models/apimachinery": "3.0.2", + "@kubernetes-models/base": "6.0.1", + "@kubernetes-models/validate": "5.0.2", "@vitejs/plugin-react": "^4.7.0", "@xterm/addon-fit": "^0.11.0", "@xterm/addon-web-links": "^0.12.0", @@ -27,6 +30,7 @@ }, "devDependencies": { "@eslint/js": "^9.0.0", + "@kubernetes-models/crd-generate": "6.1.1", "@types/react": "latest", "@types/react-dom": "latest", "eslint": "^9.0.0", @@ -771,6 +775,16 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@gar/promise-retry": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/@gar/promise-retry/-/promise-retry-1.0.3.tgz", + "integrity": "sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "node_modules/@humanfs/core": { "version": "0.19.2", "resolved": "https://registry.npmmirror.com/@humanfs/core/-/core-0.19.2.tgz", @@ -888,6 +902,171 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kubernetes-models/apimachinery": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/@kubernetes-models/apimachinery/-/apimachinery-3.0.2.tgz", + "integrity": "sha512-6Vbzr/tinxPBGGdfYjXiV9WPj8PEhyiqGJiWhXrsihK7h6glPj4HKUxZ0YwYXH/5uucm/NVef/xY3vZ4Crj1Fg==", + "license": "MIT", + "dependencies": { + "@kubernetes-models/base": "^6.0.0", + "@kubernetes-models/validate": "^5.0.1" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@kubernetes-models/base": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/@kubernetes-models/base/-/base-6.0.1.tgz", + "integrity": "sha512-pXKCFeSoL6RsMxoPDwaJ5JtijVjeuNCacgtYS9dImF7qFdzdc9lcQbem6y6Ug7/K6/bFOWdTu3qIX88IK81o0A==", + "license": "MIT", + "dependencies": { + "@kubernetes-models/validate": "^5.0.2" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@kubernetes-models/crd-generate": { + "version": "6.1.1", + "resolved": "https://registry.npmmirror.com/@kubernetes-models/crd-generate/-/crd-generate-6.1.1.tgz", + "integrity": "sha512-0Jc+x7GjWNZGcLk+Pdp8aos/qyI/7WGTeLZClkuNbELiGHYFZkFMPLr4IYwB9tz4ujGxa2ARwXJLUkayko4nJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@kubernetes-models/generate": "^3.1.1", + "@kubernetes-models/read-input": "^4.0.1", + "@kubernetes-models/string-util": "^4.0.1", + "es-toolkit": "^1.46.0", + "yaml": "^2.2.2", + "yargs": "^18.0.0" + }, + "bin": { + "crd-generate": "bin/crd-generate.js" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@kubernetes-models/generate": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/@kubernetes-models/generate/-/generate-3.2.0.tgz", + "integrity": "sha512-CMF0h0N/5VJ7zpkuiFa7+Hi94krFVf4idC+d1FkynUT/4p8X5JbDvEC+GzzbYhOg3gBCTU6NdDH+kEoWhCVfng==", + "dev": true, + "license": "MIT", + "dependencies": { + "@kubernetes-models/string-util": "^4.0.1", + "@kubernetes-models/validate": "^5.0.2", + "ajv": "^8.12.0", + "es-toolkit": "^1.46.0", + "indent-string": "^5.0.0", + "ohash": "^2.0.11", + "p-map": "^7.0.4", + "re2-wasm": "^1.0.2" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@kubernetes-models/generate/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@kubernetes-models/generate/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/@kubernetes-models/read-input": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/@kubernetes-models/read-input/-/read-input-4.0.1.tgz", + "integrity": "sha512-Q92FPRmM6YSnLMXS+UGfbJ/j2qMJzx3cjNttNkqz3q7M4CudtepXmgB5ZS54OPCHY8PJ1lOa8OZ+PQhiqn2SMA==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-cache-directory": "^6.0.0", + "get-stdin": "^10.0.0", + "make-fetch-happen": "^15.0.5" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@kubernetes-models/string-util": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/@kubernetes-models/string-util/-/string-util-4.0.1.tgz", + "integrity": "sha512-raOnQucFvVfilR35Ffw5atUwIIJ8DNKZ7U/maSfUB9kOlxTN5sb5NOhUB8198wHLTJASPnpNJmoxvq7gms6/WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + } + }, + "node_modules/@kubernetes-models/validate": { + "version": "5.0.2", + "resolved": "https://registry.npmmirror.com/@kubernetes-models/validate/-/validate-5.0.2.tgz", + "integrity": "sha512-EzfxB8mu2VPlFYSwsMlZdgTeeqJGI2R58irUrZJWHxJqOqOhnau/oS9KNCZKXjdC2vFubU6v81m2CrIoU+/pxQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.12.0", + "ajv-formats": "^3.0.1", + "ajv-formats-draft2019": "^1.6.1", + "ajv-i18n": "^4.2.0", + "is-cidr": "^6.0.4" + }, + "engines": { + "node": ">=22" + }, + "optionalDependencies": { + "re2-wasm": "^1.0.2" + } + }, + "node_modules/@kubernetes-models/validate/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@kubernetes-models/validate/node_modules/ajv-i18n": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/ajv-i18n/-/ajv-i18n-4.2.0.tgz", + "integrity": "sha512-v/ei2UkCEeuKNXh8RToiFsUclmU+G57LO1Oo22OagNMENIw+Yb8eMwvHu7Vn9fmkjJyv6XclhJ8TbuigSglPkg==", + "license": "MIT", + "peerDependencies": { + "ajv": "^8.0.0-beta.0" + } + }, + "node_modules/@kubernetes-models/validate/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, "node_modules/@napi-rs/lzma-linux-x64-gnu": { "version": "1.5.1", "resolved": "https://registry.npmmirror.com/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz", @@ -903,6 +1082,69 @@ "node": "^22.20 || ^24.12 || >=25" } }, + "node_modules/@npmcli/agent": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/@npmcli/agent/-/agent-4.0.2.tgz", + "integrity": "sha512-EUEuWAxnL07Sp5/iC/1X6Xj+XThUvnbei9zfRWZdEXa7lss9RTHMhAHBeg+MZ5To9s/gGaSI+UwZTPdYMvKSeg==", + "dev": true, + "license": "ISC", + "dependencies": { + "agent-base": "^7.1.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.1", + "lru-cache": "^11.2.1", + "socks-proxy-agent": "^8.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/agent/node_modules/lru-cache": { + "version": "11.5.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@npmcli/fs": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/@npmcli/fs/-/fs-5.0.0.tgz", + "integrity": "sha512-7OsC1gNORBEawOa5+j2pXN9vsicaIOH5cPXxoR6fJOmH6/EXpJB2CajXOu1fPRFun2m1lktEFX11+P89hqO/og==", + "dev": true, + "license": "ISC", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/redact": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/@npmcli/redact/-/redact-4.0.0.tgz", + "integrity": "sha512-gOBg5YHMfZy+TfHArfVogwgfBeQnKbbGo3pSUyK/gSI0AVu+pEiDVcKlQb0D8Mg1LNRZILZ6XG8I5dJ4KuAd9Q==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0-beta.27", "resolved": "https://registry.npmmirror.com/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", @@ -1633,11 +1875,20 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, "node_modules/ajv": { "version": "6.15.0", "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.15.0.tgz", "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -1650,6 +1901,73 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats-draft2019": { + "version": "1.6.1", + "resolved": "https://registry.npmmirror.com/ajv-formats-draft2019/-/ajv-formats-draft2019-1.6.1.tgz", + "integrity": "sha512-JQPvavpkWDvIsBp2Z33UkYCtXCSpW4HD3tAZ+oL4iEFOk9obQZffx0yANwECt6vzr6ET+7HN5czRyqXbnq/u0Q==", + "license": "MIT", + "dependencies": { + "punycode": "^2.1.1", + "schemes": "^1.4.0", + "smtp-address-parser": "^1.0.3", + "uri-js": "^4.4.1" + }, + "peerDependencies": { + "ajv": "*" + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/ansi-regex": { + "version": "6.4.0", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.4.0.tgz", + "integrity": "sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1741,6 +2059,38 @@ "devOptional": true, "license": "MIT" }, + "node_modules/cacache": { + "version": "20.0.4", + "resolved": "https://registry.npmmirror.com/cacache/-/cacache-20.0.4.tgz", + "integrity": "sha512-M3Lab8NPYlZU2exsL3bMVvMrMqgwCnMWfdZbK28bn3pK6APT/Te/I8hjRPNu1uwORY9a1eEQoifXbKPQMfMTOA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@npmcli/fs": "^5.0.0", + "fs-minipass": "^3.0.0", + "glob": "^13.0.0", + "lru-cache": "^11.1.0", + "minipass": "^7.0.3", + "minipass-collect": "^2.0.1", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "p-map": "^7.0.2", + "ssri": "^13.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "11.5.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/callsites/-/callsites-3.1.0.tgz", @@ -1787,6 +2137,48 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/cidr-regex": { + "version": "5.0.5", + "resolved": "https://registry.npmmirror.com/cidr-regex/-/cidr-regex-5.0.5.tgz", + "integrity": "sha512-59tdLZcC+BJXa4C5rOmVSuJTy/UneqfJJtCraqwdx5BDHTkGrBtKCUl3u2uiCFvXu+wk0kVuX8axX7yHCZOI9w==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", @@ -1811,9 +2203,15 @@ "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "devOptional": true, "license": "MIT" }, + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "dev": true, + "license": "ISC" + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", @@ -1821,6 +2219,20 @@ "dev": true, "license": "MIT" }, + "node_modules/content-type": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/content-type/-/content-type-2.1.0.tgz", + "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -1870,11 +2282,37 @@ "dev": true, "license": "MIT" }, + "node_modules/discontinuous-range": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz", + "integrity": "sha512-c68LpLbO+7kP/b1Hr1qs8/BJ09F5khZGTxqxZuhzxpmwJKOgRFHJWIb9/KmqnqHhLdO55aOxFH/EGBvUQbL/RQ==", + "license": "MIT" + }, "node_modules/electron-to-chromium": { "version": "1.5.400", "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.400.tgz", "integrity": "sha512-96EWDNjM59SYflgeV5Ylsf4EMiq1a25YjCnJH7cxn/AF2H3pILRweaUnoLax0yKHWdpOzY6JKEu45e8irqZIHA==" }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/es-toolkit": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/es-toolkit/-/es-toolkit-1.52.0.tgz", + "integrity": "sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==", + "dev": true, + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks", + "tests/types", + "tests/browser-compat" + ] + }, "node_modules/esbuild": { "version": "0.21.5", "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz", @@ -2110,18 +2548,22 @@ "node": ">=0.10.0" } }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true, "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, "license": "MIT" }, "node_modules/fast-levenshtein": { @@ -2131,6 +2573,22 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-uri": { + "version": "3.1.9", + "resolved": "https://registry.npmmirror.com/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.5.0.tgz", @@ -2162,6 +2620,23 @@ "node": ">=16.0.0" } }, + "node_modules/find-cache-directory": { + "version": "6.0.0", + "resolved": "https://registry.npmmirror.com/find-cache-directory/-/find-cache-directory-6.0.0.tgz", + "integrity": "sha512-CvFd5ivA6HcSHbD+59P7CyzINHXzwhuQK8RY7CxJZtgDSAtRlHiCaQpZQ2lMR/WRyUIEmzUvL6G2AGurMfegZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "common-path-prefix": "^3.0.0", + "pkg-dir": "^8.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmmirror.com/find-up/-/find-up-5.0.0.tgz", @@ -2179,13 +2654,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmmirror.com/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "node_modules/find-up-simple": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/find-up-simple/-/find-up-simple-1.0.1.tgz", + "integrity": "sha512-afd4O7zpqHeRyg4PfDQsXmlDe2PfdHtJt6Akt8jOWaApLOZk5JXs6VMR29lz03pRe9mpykrRCYIYxaJYcfpncQ==", "dev": true, "license": "MIT", - "dependencies": { + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" }, @@ -2200,6 +2688,19 @@ "dev": true, "license": "ISC" }, + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", @@ -2221,6 +2722,60 @@ "node": ">=6.9.0" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.7.0", + "resolved": "https://registry.npmmirror.com/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz", + "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stdin": { + "version": "10.0.0", + "resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-10.0.0.tgz", + "integrity": "sha512-eWSePJ4zXFdqz+/Lyfopob4rIcoF/U2XfE8nJc7iZV6lnebWc9k7DoQQpX+2a9jc0AOvBsXvbe5YkjXl/MHbpg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "13.0.6", + "resolved": "https://registry.npmmirror.com/glob/-/glob-13.0.6.tgz", + "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz", @@ -2234,6 +2789,45 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/globals": { "version": "14.0.0", "resolved": "https://registry.npmmirror.com/globals/-/globals-14.0.0.tgz", @@ -2257,6 +2851,59 @@ "node": ">=8" } }, + "node_modules/http-cache-semantics": { + "version": "4.3.0", + "resolved": "https://registry.npmmirror.com/http-cache-semantics/-/http-cache-semantics-4.3.0.tgz", + "integrity": "sha512-M5t5LlJpS1UHMjvwRQVdFHvPISGeLAxNcrWuJkeGh0KxsqCHZ1O3NXZU/8x7cD0BDcGW8kapxMKTvwlqrNkHkA==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/http-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmmirror.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.0", + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.2.tgz", @@ -2294,6 +2941,41 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ip-address": { + "version": "10.7.4", + "resolved": "https://registry.npmmirror.com/ip-address/-/ip-address-10.7.4.tgz", + "integrity": "sha512-DWBMKyeM25D70nrIiTkgQth59/G+naKOTep6huF9j+GmeK3DMD60Zvxg5d5qQnz+38AHgou6ean2LECX+lrKDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/is-cidr": { + "version": "6.0.4", + "resolved": "https://registry.npmmirror.com/is-cidr/-/is-cidr-6.0.4.tgz", + "integrity": "sha512-tOIBU3QiXy0W4LvHbcKWAWSuQfGwDiEILphFCAZtDqj7C57uv3ClO6K8aNEGV4VTA7bWJlpQ0suKQkUe6Rd6ag==", + "license": "BSD-2-Clause", + "dependencies": { + "cidr-regex": "^5.0.4" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2374,7 +3056,6 @@ "version": "0.4.1", "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { @@ -2458,6 +3139,30 @@ "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, + "node_modules/make-fetch-happen": { + "version": "15.0.6", + "resolved": "https://registry.npmmirror.com/make-fetch-happen/-/make-fetch-happen-15.0.6.tgz", + "integrity": "sha512-Je0fLJ0F5atA7F+eIlLzk+Wkcl57JDf4kf+EW8xiP5E31xOQxkIxTbgf1Oi1Lw9tRI9UEMRdI5Vz2xTzoNU1Jw==", + "dev": true, + "license": "ISC", + "dependencies": { + "@gar/promise-retry": "^1.0.0", + "@npmcli/agent": "^4.0.0", + "@npmcli/redact": "^4.0.0", + "cacache": "^20.0.1", + "http-cache-semantics": "^4.1.1", + "minipass": "^7.0.2", + "minipass-fetch": "^5.0.0", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^1.0.0", + "proc-log": "^6.0.0", + "ssri": "^13.0.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "node_modules/minimatch": { "version": "3.1.5", "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.5.tgz", @@ -2471,6 +3176,145 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-collect": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/minipass-collect/-/minipass-collect-2.0.1.tgz", + "integrity": "sha512-D7V8PO9oaz7PWGLbCACuI1qEOsq7UKfLotx/C0Aet43fCUB/wfQ7DYeq2oR/svFJGYDHPr38SHATeaj/ZoKHKw==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minipass-fetch": { + "version": "5.0.2", + "resolved": "https://registry.npmmirror.com/minipass-fetch/-/minipass-fetch-5.0.2.tgz", + "integrity": "sha512-2d0q2a8eCi2IRg/IGubCNRJoYbA1+YPXAzQVRFmB45gdGZafyivnZ5YSEfo3JikbjGxOdntGFvBQGqaSMXlAFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.0.3", + "minipass-sized": "^2.0.0", + "minizlib": "^3.0.1" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + }, + "optionalDependencies": { + "iconv-lite": "^0.7.2" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.7", + "resolved": "https://registry.npmmirror.com/minipass-flush/-/minipass-flush-1.0.7.tgz", + "integrity": "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-flush/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-flush/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-pipeline/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/minipass-sized": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/minipass-sized/-/minipass-sized-2.0.0.tgz", + "integrity": "sha512-zSsHhto5BcUVM2m1LurnXY6M//cGhVaegT71OfOXoprxT6o780GZd792ea6FfrQkuU4usHZIUczAQMRUE2plzA==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/moo": { + "version": "0.5.3", + "resolved": "https://registry.npmmirror.com/moo/-/moo-0.5.3.tgz", + "integrity": "sha512-m2fmM2dDm7GZQsY7KK2cme8agi+AAljILjQnof7p1ZMDe6dQ4bdnSMx0cPppudoeNv5hEFQirN6u+O4fDE0IWA==", + "license": "BSD-3-Clause" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", @@ -2500,6 +3344,45 @@ "dev": true, "license": "MIT" }, + "node_modules/nearley": { + "version": "2.20.1", + "resolved": "https://registry.npmmirror.com/nearley/-/nearley-2.20.1.tgz", + "integrity": "sha512-+Mc8UaAebFzgV+KpI5n7DasuuQCHA89dmwm7JXw3TV43ukfNQ9DnBH3Mdb2g/I4Fdxc26pwimBWvjIw0UAILSQ==", + "license": "MIT", + "dependencies": { + "commander": "^2.19.0", + "moo": "^0.5.0", + "railroad-diagrams": "^1.0.0", + "randexp": "0.4.6" + }, + "bin": { + "nearley-railroad": "bin/nearley-railroad.js", + "nearley-test": "bin/nearley-test.js", + "nearley-unparse": "bin/nearley-unparse.js", + "nearleyc": "bin/nearleyc.js" + }, + "funding": { + "type": "individual", + "url": "https://nearley.js.org/#give-to-nearley" + } + }, + "node_modules/negotiator": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-1.1.0.tgz", + "integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==", + "dev": true, + "license": "MIT", + "dependencies": { + "content-type": "^2.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/node-releases": { "version": "2.0.51", "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.51.tgz", @@ -2508,6 +3391,13 @@ "node": ">=18" } }, + "node_modules/ohash": { + "version": "2.0.12", + "resolved": "https://registry.npmmirror.com/ohash/-/ohash-2.0.12.tgz", + "integrity": "sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==", + "dev": true, + "license": "MIT" + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmmirror.com/optionator/-/optionator-0.9.4.tgz", @@ -2558,6 +3448,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-map": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/p-map/-/p-map-7.1.1.tgz", + "integrity": "sha512-6Lh3jQPLthYujSrlw6ccWXBGZTkoTCz27Hd92g79LH/kjAbgoEu0t442cCCNbegPSJsA0lwDX8z0bcKtkpA32g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", @@ -2591,6 +3494,33 @@ "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.5.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz", @@ -2609,6 +3539,22 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pkg-dir": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/pkg-dir/-/pkg-dir-8.0.0.tgz", + "integrity": "sha512-4peoBq4Wks0riS0z8741NVv+/8IiTvqnZAr8QGgtdifrtpdXbNw/FxRS1l6NFqm4EMzuS0EDqNNx4XGaz8cuyQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up-simple": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/postcss": { "version": "8.5.25", "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.25.tgz", @@ -2662,16 +3608,54 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/proc-log": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/proc-log/-/proc-log-6.1.0.tgz", + "integrity": "sha512-iG+GYldRf2BQ0UDUAd6JQ/RwzaQy6mXmsk/IzlYyal4A4SNFw54MeH4/tLkF4I5WoWG9SQwuqWzS99jaFQHBuQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/railroad-diagrams": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz", + "integrity": "sha512-cz93DjNeLY0idrCNOH6PviZGRN9GJhsdm9hpn1YCS879fj4W+x5IFJhhkRZcwVgMmFF7R82UA/7Oh+R8lLZg6A==", + "license": "CC0-1.0" + }, + "node_modules/randexp": { + "version": "0.4.6", + "resolved": "https://registry.npmmirror.com/randexp/-/randexp-0.4.6.tgz", + "integrity": "sha512-80WNmd9DA0tmZrw9qQa62GPPWfuXJknrmVmLcxvq4uZBdYqb1wYoKTmnlGUchvVWe0XiLupYkBoXVOxz3C8DYQ==", + "license": "MIT", + "dependencies": { + "discontinuous-range": "1.0.0", + "ret": "~0.1.10" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/re2-wasm": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/re2-wasm/-/re2-wasm-1.0.2.tgz", + "integrity": "sha512-VXUdgSiUrE/WZXn6gUIVVIsg0+Hp6VPZPOaHCay+OuFKy6u/8ktmeNEf+U5qSA8jzGGFsg8jrDNu1BeHpz2pJA==", + "devOptional": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, "node_modules/react": { "version": "19.2.8", "resolved": "https://registry.npmmirror.com/react/-/react-19.2.8.tgz", @@ -2699,6 +3683,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2709,6 +3702,15 @@ "node": ">=4" } }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmmirror.com/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "license": "MIT", + "engines": { + "node": ">=0.12" + } + }, "node_modules/rollup": { "version": "4.62.4", "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.62.4.tgz", @@ -2753,11 +3755,28 @@ "fsevents": "~2.3.2" } }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.27.0.tgz", "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==" }, + "node_modules/schemes": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/schemes/-/schemes-1.4.0.tgz", + "integrity": "sha512-ImFy9FbCsQlVgnE3TCWmLPCFnVzx0lHL/l+umHplDqAKd0dzFpnS6lFZIpagBlYhKwzVmlV36ec0Y1XTu8JBAQ==", + "license": "MIT", + "dependencies": { + "extend": "^3.0.0" + } + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", @@ -2789,6 +3808,59 @@ "node": ">=8" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/smtp-address-parser": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/smtp-address-parser/-/smtp-address-parser-1.1.0.tgz", + "integrity": "sha512-Gz11jbNU0plrReU9Sj7fmshSBxxJ9ShdD2q4ktHIHo/rpTH6lFyQoYHYKINPJtPe8aHFnsbtW46Ls0tCCBsIZg==", + "license": "MIT", + "dependencies": { + "nearley": "^2.20.1" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/socks": { + "version": "2.8.10", + "resolved": "https://registry.npmmirror.com/socks/-/socks-2.8.10.tgz", + "integrity": "sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-address": "^10.1.1", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "8.0.5", + "resolved": "https://registry.npmmirror.com/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz", + "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "^4.3.4", + "socks": "^2.8.3" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2818,6 +3890,52 @@ "source-map": "^0.6.0" } }, + "node_modules/ssri": { + "version": "13.0.1", + "resolved": "https://registry.npmmirror.com/ssri/-/ssri-13.0.1.tgz", + "integrity": "sha512-QUiRf1+u9wPTL/76GTYlKttDEBWV1ga9ZXW8BG6kfdeyyM8LGPix9gROyg9V2+P0xNyF3X2Go526xKFdMZrHSQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "minipass": "^7.0.3" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/string-width": { + "version": "8.3.0", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmmirror.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -2977,7 +4095,6 @@ "version": "4.4.1", "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -3067,11 +4184,114 @@ "node": ">=0.10.0" } }, + "node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmmirror.com/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmmirror.com/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, + "node_modules/yaml": { + "version": "2.9.1", + "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.9.1.tgz", + "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "18.2.0", + "resolved": "https://registry.npmmirror.com/yargs/-/yargs-18.2.0.tgz", + "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmmirror.com/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/apps/rlark-ui/package.json b/apps/rlark-ui/package.json index f64bd14..32b77ad 100644 --- a/apps/rlark-ui/package.json +++ b/apps/rlark-ui/package.json @@ -14,12 +14,16 @@ "scripts": { "dev": "vite --host 0.0.0.0", "build": "tsc -b && vite build", + "generate:crd-models": "node scripts/generate-crd-models.mjs", "preview": "vite preview --host 0.0.0.0", "test": "npm run test:compile && node --test tests/*.test.mjs", "test:coverage": "npm run test:compile && NODE_V8_COVERAGE=coverage/v8 node --test tests/*.test.mjs", "test:compile": "tsc -p tsconfig.test.json" }, "dependencies": { + "@kubernetes-models/apimachinery": "3.0.2", + "@kubernetes-models/base": "6.0.1", + "@kubernetes-models/validate": "5.0.2", "@vitejs/plugin-react": "^4.7.0", "@xterm/addon-fit": "^0.11.0", "@xterm/addon-web-links": "^0.12.0", @@ -31,6 +35,7 @@ }, "devDependencies": { "@eslint/js": "^9.0.0", + "@kubernetes-models/crd-generate": "6.1.1", "@types/react": "latest", "@types/react-dom": "latest", "eslint": "^9.0.0", diff --git a/apps/rlark-ui/scripts/generate-crd-models.mjs b/apps/rlark-ui/scripts/generate-crd-models.mjs new file mode 100644 index 0000000..17bfac7 --- /dev/null +++ b/apps/rlark-ui/scripts/generate-crd-models.mjs @@ -0,0 +1,72 @@ +import { readFile, readdir, rm, writeFile } from "node:fs/promises"; +import { fileURLToPath } from "node:url"; +import path from "node:path"; +import { generate } from "@kubernetes-models/crd-generate"; + +const uiDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const repositoryDir = path.resolve(uiDir, "../.."); +const crdDir = path.join(repositoryDir, "api/config/crd/bases"); +const outputDir = path.join(uiDir, "src/generated/rlark"); +const generatedHeader = + "// Code generated from api/config/crd/bases. DO NOT EDIT.\n\n"; +const expectedKinds = [ + "Addon", + "Cluster", + "Domain", + "DomainPeer", + "Job", + "Node", + "Pod", + "Task", + "Workflow", +]; + +const crdFiles = (await readdir(crdDir)) + .filter((name) => name.endsWith(".yaml")) + .sort(); + +if (crdFiles.length === 0) { + throw new Error(`no CRD manifests found in ${crdDir}`); +} + +const documents = await Promise.all( + crdFiles.map((name) => readFile(path.join(crdDir, name), "utf8")), +); + +await rm(outputDir, { recursive: true, force: true }); +await generate({ + input: documents.join("\n---\n"), + outputPath: outputDir, + yamlVersion: "1.2", +}); + +async function addGeneratedHeader(directory) { + const entries = await readdir(directory, { withFileTypes: true }); + await Promise.all( + entries.map(async (entry) => { + const file = path.join(directory, entry.name); + if (entry.isDirectory()) { + await addGeneratedHeader(file); + return; + } + if (!entry.name.endsWith(".ts") && !entry.name.endsWith(".js")) return; + const contents = await readFile(file, "utf8"); + const normalized = contents.replace(/[\t ]+$/gm, ""); + await writeFile(file, `${generatedHeader}${normalized}`); + }), + ); +} + +await addGeneratedHeader(outputDir); + +const versionDir = path.join(outputDir, "rlinf.io/v1alpha1"); +const generatedKinds = (await readdir(versionDir)) + .filter((name) => name.endsWith(".ts") && name !== "index.ts") + .map((name) => path.basename(name, ".ts")) + .sort(); + +if (generatedKinds.join("\n") !== expectedKinds.sort().join("\n")) { + throw new Error( + `generated CRD kinds do not match the registered RLark kinds: ${generatedKinds.join(", ")}`, + ); +} diff --git a/apps/rlark-ui/src/admin/AdminDashboard.tsx b/apps/rlark-ui/src/admin/AdminDashboard.tsx index 0faedcd..2c36a0e 100644 --- a/apps/rlark-ui/src/admin/AdminDashboard.tsx +++ b/apps/rlark-ui/src/admin/AdminDashboard.tsx @@ -16,7 +16,8 @@ import { ShieldCheck, } from "lucide-react"; import type { Copy } from "../i18n"; -import type { CRDDomain, CRDJob, CRDNode } from "../types"; +import type { CRDDomain, CRDNode } from "../types"; +import type { CRDJob } from "../crdModels"; import { useAutoRefresh } from "../hooks"; import { formatChinaDateTime } from "../utils/time"; import { RefreshOverlay } from "../components/shared"; @@ -37,9 +38,10 @@ const emptyData: DashboardData = { function jobDisplayName(job: CRDJob) { return ( - job.metadata.annotations?.["rlark.io/display-name"] ?? - job.metadata.labels?.["rlark.io/display-name"] ?? - job.metadata.name + job.metadata?.annotations?.["rlark.io/display-name"] ?? + job.metadata?.labels?.["rlark.io/display-name"] ?? + job.metadata?.name ?? + "" ); } @@ -123,12 +125,12 @@ export function AdminDashboard({ () => [ ...data.jobs.map((job) => ({ - id: `job-${job.metadata.name}`, + id: `job-${job.metadata?.name ?? ""}`, type: zh ? "任务" : "Job", name: jobDisplayName(job), - resourceName: job.metadata.name, + resourceName: job.metadata?.name ?? "", state: job.status?.phase ?? "Pending", - time: job.metadata.creationTimestamp, + time: job.metadata?.creationTimestamp, target: "jobs", })), ...data.nodes.map((node) => ({ @@ -383,8 +385,8 @@ export function AdminDashboard({ ))} {summary.pendingJobs.slice(0, 3).map((job) => ( + {offlineInfoKey === key && ( + + {offlineTitle} + + )} + + )} {cluster} diff --git a/apps/rlark-ui/src/crdModels.ts b/apps/rlark-ui/src/crdModels.ts new file mode 100644 index 0000000..d74fce6 --- /dev/null +++ b/apps/rlark-ui/src/crdModels.ts @@ -0,0 +1,11 @@ +import type { IJob } from "./generated/rlark/rlinf.io/v1alpha1/Job.js"; +import type { ITask } from "./generated/rlark/rlinf.io/v1alpha1/Task.js"; +import type { IWorkflow } from "./generated/rlark/rlinf.io/v1alpha1/Workflow.js"; + +export type CRDJob = IJob; +export type CRDTask = ITask; +export type CRDWorkflow = IWorkflow; + +export type CRDJobTask = NonNullable< + NonNullable["tasks"] +>[number]; diff --git a/apps/rlark-ui/src/data.ts b/apps/rlark-ui/src/data.ts index 75f8730..4ab1914 100644 --- a/apps/rlark-ui/src/data.ts +++ b/apps/rlark-ui/src/data.ts @@ -1,4 +1,5 @@ -import type { CRDWorkflow, NodeEventEntry } from "./types"; +import type { NodeEventEntry } from "./types"; +import type { CRDWorkflow } from "./crdModels"; export type Phase = | "Running" diff --git a/apps/rlark-ui/src/generated/rlark-types.contract.ts b/apps/rlark-ui/src/generated/rlark-types.contract.ts new file mode 100644 index 0000000..1105309 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark-types.contract.ts @@ -0,0 +1,46 @@ +import type { INode, ITask } from "./rlark-types"; + +// These assignments are compile-time checks for Kubernetes-native structures +// embedded in RLark CRDs. Keep them free of runtime imports. +export const generatedNodeContract: INode = { + apiVersion: "rlinf.io/v1alpha1", + kind: "Node", + status: { + capacity: { + cpu: "4", + memory: "16Gi", + }, + }, +}; + +export const generatedTaskContract: ITask = { + apiVersion: "rlinf.io/v1alpha1", + kind: "Task", + spec: { + role: "Worker", + placement: {}, + runtime: { kind: "Kubernetes" }, + workload: { + kind: "rlinf.io/ray", + version: "v1", + carrier: { type: "rlinf.io/kubernetes-deployment", version: "v1" }, + template: { + spec: { + containers: [ + { + name: "main", + image: "example.invalid/worker:latest", + ports: [{ containerPort: 8080, hostPort: 8080 }], + resources: { + requests: { + cpu: "500m", + memory: "1Gi", + }, + }, + }, + ], + }, + }, + }, + }, +}; diff --git a/apps/rlark-ui/src/generated/rlark-types.ts b/apps/rlark-ui/src/generated/rlark-types.ts new file mode 100644 index 0000000..24f88a9 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark-types.ts @@ -0,0 +1,13 @@ +// Generated CRD interfaces are re-exported here so frontend consumers do not +// depend on the generator's directory layout. +export type { + IAddon, + ICluster, + IDomain, + IDomainPeer, + IJob, + INode, + IPod, + ITask, + IWorkflow, +} from "./rlark/rlinf.io/v1alpha1"; diff --git a/apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.d.ts b/apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.d.ts new file mode 100644 index 0000000..33f8681 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.d.ts @@ -0,0 +1,3 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +export function validate(data: unknown): boolean; \ No newline at end of file diff --git a/apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.js b/apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.js new file mode 100644 index 0000000..45d1dd2 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/_schemas/RlinfIoV1alpha1Addon.js @@ -0,0 +1,889 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { formats } from "@kubernetes-models/validate"; +export const validate = validate2; +const schema2 = {"type":"object","properties":{"apiVersion":{"$ref":"rgSv5V2hoWAdXQ_XErlwxUiy6phhz4ZEBCjtqeXtVec"},"kind":{"$ref":"PaIOPeC-_xxIvi6BoizJXj0PXCt2JKVICavSJ1oOHTI"},"metadata":{"$ref":"P3srTZpWadQH4s4N9KfJR0iCqydQo9YAz7xMB2qf0GQ"},"spec":{"$ref":"dy6AYIY56BV9BHVdxew19SkY_sXMkUBtEJ4WRZTQRjo"},"status":{"$ref":"8LUpYsI1kK_DEqDWvQSoWJFsyX7jI82m4w8dW-Bvimw"}},"required":["apiVersion","kind"],"$id":"rlinf.io.v1alpha1.Addon"}; +const schema3 = {"type":"string","enum":["rlinf.io/v1alpha1"]}; + +function validate3(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema3.enum; +if(!(data === "rlinf.io/v1alpha1")){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema3.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate3.errors = vErrors; +return errors === 0; +} + +const schema4 = {"type":"string","enum":["Addon"]}; + +function validate5(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema4.enum; +if(!(data === "Addon")){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema4.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate5.errors = vErrors; +return errors === 0; +} + +const schema5 = {"nullableRef":"io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"}; +const schema6 = {}; + +import { validate as validate8 } from "@kubernetes-models/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta"; + + +function validate7(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(data !== null){ +if(!(validate8(data, {instancePath,parentData,parentDataProperty,rootData}))){ +vErrors = vErrors === null ? validate8.errors : vErrors.concat(validate8.errors); +errors = vErrors.length; +} +else { +} +} +validate7.errors = vErrors; +return errors === 0; +} + +const schema7 = {"properties":{"addonName":{"$ref":"sLlNkWhANXZ15lvmcujppy1mXxqn6f-GaeQpWRYm_dw"},"values":{"$ref":"HJJzIHbiJa8GGL2u2CTOVy-Hry2MGWIvSIk30RN75wI"},"version":{"$ref":"ldoCEsh0ARg8F2aeji6S38NFl7aLPSuz1hGlgX2tjuQ"}},"required":["addonName"],"type":"object","nullable":true}; +const schema0 = {"type":"string"}; + +function validate0(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +validate0.errors = vErrors; +return errors === 0; +} + +const schema8 = {"additionalProperties":{"$ref":"sLlNkWhANXZ15lvmcujppy1mXxqn6f-GaeQpWRYm_dw"},"type":"object","properties":{},"nullable":true}; + +function validate13(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(data && typeof data == "object" && !Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +const _errs2 = errors; +for(const key0 in data){ +let data0 = data[key0]; +const _errs3 = errors; +if(!(validate0(data0, {instancePath:instancePath+"/" + key0.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data,parentDataProperty:key0,rootData}))){ +vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +} +validate13.errors = vErrors; +return errors === 0; +} + +const schema1 = {"type":"string","nullable":true}; + +function validate1(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((typeof data !== "string") && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +validate1.errors = vErrors; +return errors === 0; +} + + +function validate11(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(data && typeof data == "object" && !Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.addonName === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "addonName"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.addonName !== undefined){ +let data0 = data.addonName; +const _errs2 = errors; +if(!(validate0(data0, {instancePath:instancePath+"/addonName",parentData:data,parentDataProperty:"addonName",rootData}))){ +vErrors = vErrors === null ? validate0.errors : vErrors.concat(validate0.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.values !== undefined){ +let data1 = data.values; +const _errs3 = errors; +if(!(validate13(data1, {instancePath:instancePath+"/values",parentData:data,parentDataProperty:"values",rootData}))){ +vErrors = vErrors === null ? validate13.errors : vErrors.concat(validate13.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.version !== undefined){ +let data2 = data.version; +const _errs4 = errors; +if(!(validate1(data2, {instancePath:instancePath+"/version",parentData:data,parentDataProperty:"version",rootData}))){ +vErrors = vErrors === null ? validate1.errors : vErrors.concat(validate1.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +} +validate11.errors = vErrors; +return errors === 0; +} + +const schema9 = {"properties":{"conditions":{"$ref":"hhAxL57cvApnLYfNWQbGuX0ymd4M4buVmG7H0q63I0w"},"message":{"$ref":"ldoCEsh0ARg8F2aeji6S38NFl7aLPSuz1hGlgX2tjuQ"},"observedGeneration":{"$ref":"otlW-2SioSJxw2ZRa8bQrFi14CUkm_yS2tfdShK98Vk"},"phase":{"$ref":"rALgVTnxvFUQ19NTtgTcy3yDwujG7Gl8dwgvNSVZ_N0"},"version":{"$ref":"ldoCEsh0ARg8F2aeji6S38NFl7aLPSuz1hGlgX2tjuQ"}},"type":"object","nullable":true}; +const schema10 = {"items":{"$ref":"dZ13d79yfL0AfKGv8XJr0-7aalgpv7dwgkV5EU9HxwM"},"type":"array","nullable":true}; +const schema11 = {"properties":{"lastTransitionTime":{"$ref":"nWP098h5Flk6EOMa_OWYW4EnhyCrisyvgJPgk0WtC9c"},"message":{"$ref":"CG805GD3KzsipQt5EKLOQw9SjU_4PVFnnbOjDh0LzJQ"},"observedGeneration":{"$ref":"Tv0gqme9PlVaT-l831KRjUe4u9reG1m_llVaPqPtqUs"},"reason":{"$ref":"UPBfG4e9zcqG6mx3tN1LWinVzYKOFfIO2VnMgg6lAWI"},"status":{"$ref":"UcCRuQZyUlftnmEwuGDZcciwLAdzzRj4HOLofWAwyW8"},"type":{"$ref":"grctw_GwW6iDVZUzowft1rMz55_d64qiJ_wOfyk2Qoo"}},"required":["lastTransitionTime","message","reason","status","type"],"type":"object"}; +const schema12 = {"format":"date-time","type":"string"}; +const formats0 = formats["date-time"]; + +function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if((typeof data == "number") && (isFinite(data))){ +} +if(typeof data === "string"){ +if(!(formats0.validate(data))){ +const err0 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "date-time"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate21.errors = vErrors; +return errors === 0; +} + +const schema13 = {"maxLength":32768,"type":"string"}; +import func0 from "@kubernetes-models/validate/runtime/ucs2length"; + +function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 32768){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 32768}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate23.errors = vErrors; +return errors === 0; +} + +const schema14 = {"format":"int64","type":"integer","minimum":0,"nullable":true}; +const formats2 = formats.int64; + +function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if((typeof data == "number") && (isFinite(data))){ +if(data < 0 || isNaN(data)){ +const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!(formats2.validate(data))){ +const err2 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "int64"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +if(typeof data === "string"){ +} +validate25.errors = vErrors; +return errors === 0; +} + +const schema15 = {"maxLength":1024,"minLength":1,"pattern":"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$","type":"string"}; +const pattern0 = new RegExp("^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", "u"); + +function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 1024){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 1024}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(func0(data) < 1){ +const err1 = {instancePath,schemaPath:"#/minLength",keyword:"minLength",params:{limit: 1}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!pattern0.test(data)){ +const err2 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +else { +const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +validate27.errors = vErrors; +return errors === 0; +} + +const schema16 = {"enum":["True","False","Unknown"],"type":"string"}; + +function validate29(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema16.enum; +if(!(((data === "True") || (data === "False")) || (data === "Unknown"))){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema16.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate29.errors = vErrors; +return errors === 0; +} + +const schema17 = {"maxLength":316,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$","type":"string"}; +const pattern1 = new RegExp("^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", "u"); + +function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 316){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 316}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(!pattern1.test(data)){ +const err1 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +else { +const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +validate31.errors = vErrors; +return errors === 0; +} + + +function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.lastTransitionTime === undefined){ +const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lastTransitionTime"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(data.message === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.reason === undefined){ +const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reason"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +if(data.status === undefined){ +const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +if(data.type === undefined){ +const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"}}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +if(data.lastTransitionTime !== undefined){ +let data0 = data.lastTransitionTime; +const _errs1 = errors; +if(!(validate21(data0, {instancePath:instancePath+"/lastTransitionTime",parentData:data,parentDataProperty:"lastTransitionTime",rootData}))){ +vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs1 === errors; +} +if(data.message !== undefined){ +let data1 = data.message; +const _errs2 = errors; +if(!(validate23(data1, {instancePath:instancePath+"/message",parentData:data,parentDataProperty:"message",rootData}))){ +vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.observedGeneration !== undefined){ +let data2 = data.observedGeneration; +const _errs3 = errors; +if(!(validate25(data2, {instancePath:instancePath+"/observedGeneration",parentData:data,parentDataProperty:"observedGeneration",rootData}))){ +vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.reason !== undefined){ +let data3 = data.reason; +const _errs4 = errors; +if(!(validate27(data3, {instancePath:instancePath+"/reason",parentData:data,parentDataProperty:"reason",rootData}))){ +vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +if(data.status !== undefined){ +let data4 = data.status; +const _errs5 = errors; +if(!(validate29(data4, {instancePath:instancePath+"/status",parentData:data,parentDataProperty:"status",rootData}))){ +vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs5 === errors; +} +if(data.type !== undefined){ +let data5 = data.type; +const _errs6 = errors; +if(!(validate31(data5, {instancePath:instancePath+"/type",parentData:data,parentDataProperty:"type",rootData}))){ +vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs6 === errors; +} +} +else { +const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +validate20.errors = vErrors; +return errors === 0; +} + + +function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(Array.isArray(data)){ +let valid1 = true; +const len0 = data.length; +for(let i0=0; i0 32768){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 32768}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate22.errors = vErrors; +return errors === 0; +} + +const schema14 = {"format":"int64","type":"integer","minimum":0,"nullable":true}; +const formats4 = formats.int64; + +function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if((typeof data == "number") && (isFinite(data))){ +if(data < 0 || isNaN(data)){ +const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!(formats4.validate(data))){ +const err2 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "int64"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +if(typeof data === "string"){ +} +validate24.errors = vErrors; +return errors === 0; +} + +const schema15 = {"maxLength":1024,"minLength":1,"pattern":"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$","type":"string"}; +const pattern0 = new RegExp("^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", "u"); + +function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 1024){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 1024}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(func0(data) < 1){ +const err1 = {instancePath,schemaPath:"#/minLength",keyword:"minLength",params:{limit: 1}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!pattern0.test(data)){ +const err2 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +else { +const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +validate26.errors = vErrors; +return errors === 0; +} + +const schema16 = {"enum":["True","False","Unknown"],"type":"string"}; + +function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema16.enum; +if(!(((data === "True") || (data === "False")) || (data === "Unknown"))){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema16.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate28.errors = vErrors; +return errors === 0; +} + +const schema17 = {"maxLength":316,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$","type":"string"}; +const pattern1 = new RegExp("^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", "u"); + +function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 316){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 316}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(!pattern1.test(data)){ +const err1 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +else { +const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +validate30.errors = vErrors; +return errors === 0; +} + + +function validate19(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.lastTransitionTime === undefined){ +const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lastTransitionTime"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(data.message === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.reason === undefined){ +const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reason"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +if(data.status === undefined){ +const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +if(data.type === undefined){ +const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"}}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +if(data.lastTransitionTime !== undefined){ +let data0 = data.lastTransitionTime; +const _errs1 = errors; +if(!(validate20(data0, {instancePath:instancePath+"/lastTransitionTime",parentData:data,parentDataProperty:"lastTransitionTime",rootData}))){ +vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs1 === errors; +} +if(data.message !== undefined){ +let data1 = data.message; +const _errs2 = errors; +if(!(validate22(data1, {instancePath:instancePath+"/message",parentData:data,parentDataProperty:"message",rootData}))){ +vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.observedGeneration !== undefined){ +let data2 = data.observedGeneration; +const _errs3 = errors; +if(!(validate24(data2, {instancePath:instancePath+"/observedGeneration",parentData:data,parentDataProperty:"observedGeneration",rootData}))){ +vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.reason !== undefined){ +let data3 = data.reason; +const _errs4 = errors; +if(!(validate26(data3, {instancePath:instancePath+"/reason",parentData:data,parentDataProperty:"reason",rootData}))){ +vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +if(data.status !== undefined){ +let data4 = data.status; +const _errs5 = errors; +if(!(validate28(data4, {instancePath:instancePath+"/status",parentData:data,parentDataProperty:"status",rootData}))){ +vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs5 === errors; +} +if(data.type !== undefined){ +let data5 = data.type; +const _errs6 = errors; +if(!(validate30(data5, {instancePath:instancePath+"/type",parentData:data,parentDataProperty:"type",rootData}))){ +vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs6 === errors; +} +} +else { +const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +validate19.errors = vErrors; +return errors === 0; +} + + +function validate18(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(Array.isArray(data)){ +let valid1 = true; +const len0 = data.length; +for(let i0=0; i0 32768){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 32768}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate18.errors = vErrors; +return errors === 0; +} + +const schema12 = {"format":"int64","type":"integer","minimum":0,"nullable":true}; +const formats2 = formats.int64; + +function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if((typeof data == "number") && (isFinite(data))){ +if(data < 0 || isNaN(data)){ +const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!(formats2.validate(data))){ +const err2 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "int64"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +if(typeof data === "string"){ +} +validate20.errors = vErrors; +return errors === 0; +} + +const schema13 = {"maxLength":1024,"minLength":1,"pattern":"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$","type":"string"}; +const pattern0 = new RegExp("^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", "u"); + +function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 1024){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 1024}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(func0(data) < 1){ +const err1 = {instancePath,schemaPath:"#/minLength",keyword:"minLength",params:{limit: 1}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!pattern0.test(data)){ +const err2 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +else { +const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +validate22.errors = vErrors; +return errors === 0; +} + +const schema14 = {"enum":["True","False","Unknown"],"type":"string"}; + +function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema14.enum; +if(!(((data === "True") || (data === "False")) || (data === "Unknown"))){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema14.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate24.errors = vErrors; +return errors === 0; +} + +const schema15 = {"maxLength":316,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$","type":"string"}; +const pattern1 = new RegExp("^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", "u"); + +function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 316){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 316}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(!pattern1.test(data)){ +const err1 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +else { +const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +validate26.errors = vErrors; +return errors === 0; +} + + +function validate15(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.lastTransitionTime === undefined){ +const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lastTransitionTime"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(data.message === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.reason === undefined){ +const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reason"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +if(data.status === undefined){ +const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +if(data.type === undefined){ +const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"}}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +if(data.lastTransitionTime !== undefined){ +let data0 = data.lastTransitionTime; +const _errs1 = errors; +if(!(validate16(data0, {instancePath:instancePath+"/lastTransitionTime",parentData:data,parentDataProperty:"lastTransitionTime",rootData}))){ +vErrors = vErrors === null ? validate16.errors : vErrors.concat(validate16.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs1 === errors; +} +if(data.message !== undefined){ +let data1 = data.message; +const _errs2 = errors; +if(!(validate18(data1, {instancePath:instancePath+"/message",parentData:data,parentDataProperty:"message",rootData}))){ +vErrors = vErrors === null ? validate18.errors : vErrors.concat(validate18.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.observedGeneration !== undefined){ +let data2 = data.observedGeneration; +const _errs3 = errors; +if(!(validate20(data2, {instancePath:instancePath+"/observedGeneration",parentData:data,parentDataProperty:"observedGeneration",rootData}))){ +vErrors = vErrors === null ? validate20.errors : vErrors.concat(validate20.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.reason !== undefined){ +let data3 = data.reason; +const _errs4 = errors; +if(!(validate22(data3, {instancePath:instancePath+"/reason",parentData:data,parentDataProperty:"reason",rootData}))){ +vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +if(data.status !== undefined){ +let data4 = data.status; +const _errs5 = errors; +if(!(validate24(data4, {instancePath:instancePath+"/status",parentData:data,parentDataProperty:"status",rootData}))){ +vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs5 === errors; +} +if(data.type !== undefined){ +let data5 = data.type; +const _errs6 = errors; +if(!(validate26(data5, {instancePath:instancePath+"/type",parentData:data,parentDataProperty:"type",rootData}))){ +vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs6 === errors; +} +} +else { +const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +validate15.errors = vErrors; +return errors === 0; +} + + +function validate14(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(Array.isArray(data)){ +let valid1 = true; +const len0 = data.length; +for(let i0=0; i0 32768){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 32768}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate732.errors = vErrors; +return errors === 0; +} + +const schema180 = {"format":"int64","type":"integer","minimum":0,"nullable":true}; + +function validate734(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if((typeof data == "number") && (isFinite(data))){ +if(data < 0 || isNaN(data)){ +const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!(formats2.validate(data))){ +const err2 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "int64"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +if(typeof data === "string"){ +} +validate734.errors = vErrors; +return errors === 0; +} + +const schema181 = {"maxLength":1024,"minLength":1,"pattern":"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$","type":"string"}; +const pattern1 = new RegExp("^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", "u"); + +function validate736(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 1024){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 1024}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(func0(data) < 1){ +const err1 = {instancePath,schemaPath:"#/minLength",keyword:"minLength",params:{limit: 1}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!pattern1.test(data)){ +const err2 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +else { +const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +validate736.errors = vErrors; +return errors === 0; +} + +const schema182 = {"enum":["True","False","Unknown"],"type":"string"}; + +function validate738(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema182.enum; +if(!(((data === "True") || (data === "False")) || (data === "Unknown"))){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema182.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate738.errors = vErrors; +return errors === 0; +} + +const schema183 = {"maxLength":316,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$","type":"string"}; +const pattern2 = new RegExp("^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", "u"); + +function validate740(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 316){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 316}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(!pattern2.test(data)){ +const err1 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +else { +const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +validate740.errors = vErrors; +return errors === 0; +} + + +function validate729(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.lastTransitionTime === undefined){ +const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lastTransitionTime"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(data.message === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.reason === undefined){ +const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reason"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +if(data.status === undefined){ +const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +if(data.type === undefined){ +const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"}}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +if(data.lastTransitionTime !== undefined){ +let data0 = data.lastTransitionTime; +const _errs1 = errors; +if(!(validate730(data0, {instancePath:instancePath+"/lastTransitionTime",parentData:data,parentDataProperty:"lastTransitionTime",rootData}))){ +vErrors = vErrors === null ? validate730.errors : vErrors.concat(validate730.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs1 === errors; +} +if(data.message !== undefined){ +let data1 = data.message; +const _errs2 = errors; +if(!(validate732(data1, {instancePath:instancePath+"/message",parentData:data,parentDataProperty:"message",rootData}))){ +vErrors = vErrors === null ? validate732.errors : vErrors.concat(validate732.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.observedGeneration !== undefined){ +let data2 = data.observedGeneration; +const _errs3 = errors; +if(!(validate734(data2, {instancePath:instancePath+"/observedGeneration",parentData:data,parentDataProperty:"observedGeneration",rootData}))){ +vErrors = vErrors === null ? validate734.errors : vErrors.concat(validate734.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.reason !== undefined){ +let data3 = data.reason; +const _errs4 = errors; +if(!(validate736(data3, {instancePath:instancePath+"/reason",parentData:data,parentDataProperty:"reason",rootData}))){ +vErrors = vErrors === null ? validate736.errors : vErrors.concat(validate736.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +if(data.status !== undefined){ +let data4 = data.status; +const _errs5 = errors; +if(!(validate738(data4, {instancePath:instancePath+"/status",parentData:data,parentDataProperty:"status",rootData}))){ +vErrors = vErrors === null ? validate738.errors : vErrors.concat(validate738.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs5 === errors; +} +if(data.type !== undefined){ +let data5 = data.type; +const _errs6 = errors; +if(!(validate740(data5, {instancePath:instancePath+"/type",parentData:data,parentDataProperty:"type",rootData}))){ +vErrors = vErrors === null ? validate740.errors : vErrors.concat(validate740.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs6 === errors; +} +} +else { +const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +validate729.errors = vErrors; +return errors === 0; +} + + +function validate728(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(Array.isArray(data)){ +let valid1 = true; +const len0 = data.length; +for(let i0=0; i0 32768){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 32768}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate39.errors = vErrors; +return errors === 0; +} + +const schema23 = {"format":"int64","type":"integer","minimum":0,"nullable":true}; +const formats2 = formats.int64; + +function validate41(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if((typeof data == "number") && (isFinite(data))){ +if(data < 0 || isNaN(data)){ +const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!(formats2.validate(data))){ +const err2 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "int64"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +if(typeof data === "string"){ +} +validate41.errors = vErrors; +return errors === 0; +} + +const schema24 = {"maxLength":1024,"minLength":1,"pattern":"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$","type":"string"}; +const pattern1 = new RegExp("^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", "u"); + +function validate43(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 1024){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 1024}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(func0(data) < 1){ +const err1 = {instancePath,schemaPath:"#/minLength",keyword:"minLength",params:{limit: 1}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!pattern1.test(data)){ +const err2 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +else { +const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +validate43.errors = vErrors; +return errors === 0; +} + +const schema25 = {"enum":["True","False","Unknown"],"type":"string"}; + +function validate45(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema25.enum; +if(!(((data === "True") || (data === "False")) || (data === "Unknown"))){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema25.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate45.errors = vErrors; +return errors === 0; +} + +const schema26 = {"maxLength":316,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$","type":"string"}; +const pattern2 = new RegExp("^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", "u"); + +function validate47(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 316){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 316}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(!pattern2.test(data)){ +const err1 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +else { +const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +validate47.errors = vErrors; +return errors === 0; +} + + +function validate36(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.lastTransitionTime === undefined){ +const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lastTransitionTime"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(data.message === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.reason === undefined){ +const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reason"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +if(data.status === undefined){ +const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +if(data.type === undefined){ +const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"}}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +if(data.lastTransitionTime !== undefined){ +let data0 = data.lastTransitionTime; +const _errs1 = errors; +if(!(validate37(data0, {instancePath:instancePath+"/lastTransitionTime",parentData:data,parentDataProperty:"lastTransitionTime",rootData}))){ +vErrors = vErrors === null ? validate37.errors : vErrors.concat(validate37.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs1 === errors; +} +if(data.message !== undefined){ +let data1 = data.message; +const _errs2 = errors; +if(!(validate39(data1, {instancePath:instancePath+"/message",parentData:data,parentDataProperty:"message",rootData}))){ +vErrors = vErrors === null ? validate39.errors : vErrors.concat(validate39.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.observedGeneration !== undefined){ +let data2 = data.observedGeneration; +const _errs3 = errors; +if(!(validate41(data2, {instancePath:instancePath+"/observedGeneration",parentData:data,parentDataProperty:"observedGeneration",rootData}))){ +vErrors = vErrors === null ? validate41.errors : vErrors.concat(validate41.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.reason !== undefined){ +let data3 = data.reason; +const _errs4 = errors; +if(!(validate43(data3, {instancePath:instancePath+"/reason",parentData:data,parentDataProperty:"reason",rootData}))){ +vErrors = vErrors === null ? validate43.errors : vErrors.concat(validate43.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +if(data.status !== undefined){ +let data4 = data.status; +const _errs5 = errors; +if(!(validate45(data4, {instancePath:instancePath+"/status",parentData:data,parentDataProperty:"status",rootData}))){ +vErrors = vErrors === null ? validate45.errors : vErrors.concat(validate45.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs5 === errors; +} +if(data.type !== undefined){ +let data5 = data.type; +const _errs6 = errors; +if(!(validate47(data5, {instancePath:instancePath+"/type",parentData:data,parentDataProperty:"type",rootData}))){ +vErrors = vErrors === null ? validate47.errors : vErrors.concat(validate47.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs6 === errors; +} +} +else { +const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +validate36.errors = vErrors; +return errors === 0; +} + + +function validate35(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(Array.isArray(data)){ +let valid1 = true; +const len0 = data.length; +for(let i0=0; i0 32768){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 32768}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate722.errors = vErrors; +return errors === 0; +} + +const schema177 = {"format":"int64","type":"integer","minimum":0,"nullable":true}; + +function validate724(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if((typeof data == "number") && (isFinite(data))){ +if(data < 0 || isNaN(data)){ +const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!(formats2.validate(data))){ +const err2 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "int64"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +if(typeof data === "string"){ +} +validate724.errors = vErrors; +return errors === 0; +} + +const schema178 = {"maxLength":1024,"minLength":1,"pattern":"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$","type":"string"}; +const pattern1 = new RegExp("^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", "u"); + +function validate726(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 1024){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 1024}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(func0(data) < 1){ +const err1 = {instancePath,schemaPath:"#/minLength",keyword:"minLength",params:{limit: 1}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!pattern1.test(data)){ +const err2 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +else { +const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +validate726.errors = vErrors; +return errors === 0; +} + +const schema179 = {"enum":["True","False","Unknown"],"type":"string"}; + +function validate728(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema179.enum; +if(!(((data === "True") || (data === "False")) || (data === "Unknown"))){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema179.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate728.errors = vErrors; +return errors === 0; +} + +const schema180 = {"maxLength":316,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$","type":"string"}; +const pattern2 = new RegExp("^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", "u"); + +function validate730(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 316){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 316}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(!pattern2.test(data)){ +const err1 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +else { +const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +validate730.errors = vErrors; +return errors === 0; +} + + +function validate719(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.lastTransitionTime === undefined){ +const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lastTransitionTime"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(data.message === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.reason === undefined){ +const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reason"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +if(data.status === undefined){ +const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +if(data.type === undefined){ +const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"}}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +if(data.lastTransitionTime !== undefined){ +let data0 = data.lastTransitionTime; +const _errs1 = errors; +if(!(validate720(data0, {instancePath:instancePath+"/lastTransitionTime",parentData:data,parentDataProperty:"lastTransitionTime",rootData}))){ +vErrors = vErrors === null ? validate720.errors : vErrors.concat(validate720.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs1 === errors; +} +if(data.message !== undefined){ +let data1 = data.message; +const _errs2 = errors; +if(!(validate722(data1, {instancePath:instancePath+"/message",parentData:data,parentDataProperty:"message",rootData}))){ +vErrors = vErrors === null ? validate722.errors : vErrors.concat(validate722.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.observedGeneration !== undefined){ +let data2 = data.observedGeneration; +const _errs3 = errors; +if(!(validate724(data2, {instancePath:instancePath+"/observedGeneration",parentData:data,parentDataProperty:"observedGeneration",rootData}))){ +vErrors = vErrors === null ? validate724.errors : vErrors.concat(validate724.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.reason !== undefined){ +let data3 = data.reason; +const _errs4 = errors; +if(!(validate726(data3, {instancePath:instancePath+"/reason",parentData:data,parentDataProperty:"reason",rootData}))){ +vErrors = vErrors === null ? validate726.errors : vErrors.concat(validate726.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +if(data.status !== undefined){ +let data4 = data.status; +const _errs5 = errors; +if(!(validate728(data4, {instancePath:instancePath+"/status",parentData:data,parentDataProperty:"status",rootData}))){ +vErrors = vErrors === null ? validate728.errors : vErrors.concat(validate728.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs5 === errors; +} +if(data.type !== undefined){ +let data5 = data.type; +const _errs6 = errors; +if(!(validate730(data5, {instancePath:instancePath+"/type",parentData:data,parentDataProperty:"type",rootData}))){ +vErrors = vErrors === null ? validate730.errors : vErrors.concat(validate730.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs6 === errors; +} +} +else { +const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +validate719.errors = vErrors; +return errors === 0; +} + + +function validate718(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(Array.isArray(data)){ +let valid1 = true; +const len0 = data.length; +for(let i0=0; i0 32768){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 32768}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +} +else { +const err1 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate740.errors = vErrors; +return errors === 0; +} + +const schema182 = {"format":"int64","type":"integer","minimum":0,"nullable":true}; + +function validate742(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(((typeof data == "number") && (!(data % 1) && !isNaN(data))) && (isFinite(data)))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "integer"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if((typeof data == "number") && (isFinite(data))){ +if(data < 0 || isNaN(data)){ +const err1 = {instancePath,schemaPath:"#/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!(formats2.validate(data))){ +const err2 = {instancePath,schemaPath:"#/format",keyword:"format",params:{format: "int64"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +if(typeof data === "string"){ +} +validate742.errors = vErrors; +return errors === 0; +} + +const schema183 = {"maxLength":1024,"minLength":1,"pattern":"^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$","type":"string"}; +const pattern1 = new RegExp("^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", "u"); + +function validate744(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 1024){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 1024}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(func0(data) < 1){ +const err1 = {instancePath,schemaPath:"#/minLength",keyword:"minLength",params:{limit: 1}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(!pattern1.test(data)){ +const err2 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +} +else { +const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +validate744.errors = vErrors; +return errors === 0; +} + +const schema184 = {"enum":["True","False","Unknown"],"type":"string"}; + +function validate746(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if(typeof data !== "string"){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const vSchema0 = schema184.enum; +if(!(((data === "True") || (data === "False")) || (data === "Unknown"))){ +const err1 = {instancePath,schemaPath:"#/enum",keyword:"enum",params:{allowedValues: schema184.enum}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +validate746.errors = vErrors; +return errors === 0; +} + +const schema185 = {"maxLength":316,"pattern":"^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$","type":"string"}; +const pattern2 = new RegExp("^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", "u"); + +function validate748(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(typeof data === "string"){ +if(func0(data) > 316){ +const err0 = {instancePath,schemaPath:"#/maxLength",keyword:"maxLength",params:{limit: 316}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(!pattern2.test(data)){ +const err1 = {instancePath,schemaPath:"#/pattern",keyword:"pattern",params:{pattern: "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +} +else { +const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "string"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +validate748.errors = vErrors; +return errors === 0; +} + + +function validate737(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +const _errs0 = errors; +if(data && typeof data == "object" && !Array.isArray(data)){ +if(data.lastTransitionTime === undefined){ +const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "lastTransitionTime"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +if(data.message === undefined){ +const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "message"}}; +if(vErrors === null){ +vErrors = [err1]; +} +else { +vErrors.push(err1); +} +errors++; +} +if(data.reason === undefined){ +const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "reason"}}; +if(vErrors === null){ +vErrors = [err2]; +} +else { +vErrors.push(err2); +} +errors++; +} +if(data.status === undefined){ +const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "status"}}; +if(vErrors === null){ +vErrors = [err3]; +} +else { +vErrors.push(err3); +} +errors++; +} +if(data.type === undefined){ +const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"}}; +if(vErrors === null){ +vErrors = [err4]; +} +else { +vErrors.push(err4); +} +errors++; +} +if(data.lastTransitionTime !== undefined){ +let data0 = data.lastTransitionTime; +const _errs1 = errors; +if(!(validate738(data0, {instancePath:instancePath+"/lastTransitionTime",parentData:data,parentDataProperty:"lastTransitionTime",rootData}))){ +vErrors = vErrors === null ? validate738.errors : vErrors.concat(validate738.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs1 === errors; +} +if(data.message !== undefined){ +let data1 = data.message; +const _errs2 = errors; +if(!(validate740(data1, {instancePath:instancePath+"/message",parentData:data,parentDataProperty:"message",rootData}))){ +vErrors = vErrors === null ? validate740.errors : vErrors.concat(validate740.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs2 === errors; +} +if(data.observedGeneration !== undefined){ +let data2 = data.observedGeneration; +const _errs3 = errors; +if(!(validate742(data2, {instancePath:instancePath+"/observedGeneration",parentData:data,parentDataProperty:"observedGeneration",rootData}))){ +vErrors = vErrors === null ? validate742.errors : vErrors.concat(validate742.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs3 === errors; +} +if(data.reason !== undefined){ +let data3 = data.reason; +const _errs4 = errors; +if(!(validate744(data3, {instancePath:instancePath+"/reason",parentData:data,parentDataProperty:"reason",rootData}))){ +vErrors = vErrors === null ? validate744.errors : vErrors.concat(validate744.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs4 === errors; +} +if(data.status !== undefined){ +let data4 = data.status; +const _errs5 = errors; +if(!(validate746(data4, {instancePath:instancePath+"/status",parentData:data,parentDataProperty:"status",rootData}))){ +vErrors = vErrors === null ? validate746.errors : vErrors.concat(validate746.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs5 === errors; +} +if(data.type !== undefined){ +let data5 = data.type; +const _errs6 = errors; +if(!(validate748(data5, {instancePath:instancePath+"/type",parentData:data,parentDataProperty:"type",rootData}))){ +vErrors = vErrors === null ? validate748.errors : vErrors.concat(validate748.errors); +errors = vErrors.length; +} +else { +} +var valid0 = _errs6 === errors; +} +} +else { +const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"}}; +if(vErrors === null){ +vErrors = [err5]; +} +else { +vErrors.push(err5); +} +errors++; +} +validate737.errors = vErrors; +return errors === 0; +} + + +function validate736(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){ +let vErrors = null; +let errors = 0; +if((!(Array.isArray(data))) && (data !== null)){ +const err0 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "array"}}; +if(vErrors === null){ +vErrors = [err0]; +} +else { +vErrors.push(err0); +} +errors++; +} +const _errs0 = errors; +const _errs1 = errors; +if(Array.isArray(data)){ +let valid1 = true; +const len0 = data.length; +for(let i0=0; i0; + "message"?: string; + /** + * ObservedGeneration 是 Addon 控制器最近一次完成调谐时所观测到的 + * metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + * phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + */ + "observedGeneration"?: number; + /** + * AddonPhase 是 Addon 安装与升级流程的聚合阶段,由数据面 Agent 观测后上报。 + * 取值集合在 CRD Schema 层封闭,新增取值必须同步更新枚举校验与文档。 + */ + "phase"?: "Pending" | "Installing" | "Ready" | "Failed" | "Upgrading"; + "version"?: string; + }; +} + +export class Addon extends Model implements IAddon { + "apiVersion": IAddon["apiVersion"]; + "kind": IAddon["kind"]; + "metadata"?: IAddon["metadata"]; + "spec"?: IAddon["spec"]; + "status"?: IAddon["status"]; + +static apiVersion: IAddon["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: IAddon["kind"] = "Addon"; +static is = createTypeMetaGuard(Addon); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Addon.apiVersion, + kind: Addon.kind, + ...data + } as IAddon); +} +} + + +setValidateFunc(Addon, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Cluster.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Cluster.ts new file mode 100644 index 0000000..053486a --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Cluster.ts @@ -0,0 +1,109 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1Cluster.js"; + +export interface ICluster { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "Cluster"; + "metadata"?: IObjectMeta; + /** + * ClusterSpec declares the durable operational state of a data-plane cluster. + */ + "spec"?: { + /** + * AgentNamespace is the management-plane namespace that contains the agent heartbeat Lease and Node CRs. + */ + "agentNamespace": string; + "cordoned"?: boolean; + "draining"?: boolean; + }; + /** + * ClusterStatus reports the controller's current observation of a data-plane cluster. + */ + "status"?: { + "conditions"?: Array<{ + /** + * lastTransitionTime is the last time the condition transitioned from one status to another. + * This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + */ + "lastTransitionTime": string; + /** + * message is a human readable message indicating details about the transition. + * This may be an empty string. + */ + "message": string; + /** + * observedGeneration represents the .metadata.generation that the condition was set based upon. + * For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + * with respect to the current state of the instance. + */ + "observedGeneration"?: number; + /** + * reason contains a programmatic identifier indicating the reason for the condition's last transition. + * Producers of specific condition types may define expected values and meanings for this field, + * and whether the values are considered a guaranteed API. + * The value should be a CamelCase string. + * This field may not be empty. + */ + "reason": string; + /** + * status of the condition, one of True, False, Unknown. + */ + "status": "True" | "False" | "Unknown"; + /** + * type of condition in CamelCase or in foo.example.com/CamelCase. + */ + "type": string; + }>; + "lastHeartbeatTime"?: string; + "onlineNodes"?: number; + /** + * ClusterPhase summarizes the current lifecycle state of a data-plane cluster. + * The set is closed in the CRD schema: adding a value requires updating the + * enum marker, regenerating the CRD manifests, and updating the documentation. + */ + "phase"?: "Online" | "Offline" | "Downgraded" | "Cordoned" | "Draining"; + "totalNodes"?: number; + }; +} + +export class Cluster extends Model implements ICluster { + "apiVersion": ICluster["apiVersion"]; + "kind": ICluster["kind"]; + "metadata"?: ICluster["metadata"]; + "spec"?: ICluster["spec"]; + "status"?: ICluster["status"]; + +static apiVersion: ICluster["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: ICluster["kind"] = "Cluster"; +static is = createTypeMetaGuard(Cluster); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Cluster.apiVersion, + kind: Cluster.kind, + ...data + } as ICluster); +} +} + + +setValidateFunc(Cluster, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Domain.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Domain.ts new file mode 100644 index 0000000..816a4ac --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Domain.ts @@ -0,0 +1,109 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1Domain.js"; + +export interface IDomain { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "Domain"; + "metadata"?: IObjectMeta; + "spec"?: { + "cidr"?: string; + }; + "status"?: { + /** + * Conditions 记录 Domain 的结构化状态结论,当前仅包含 ConditionTypeValidated + * (Spec.CIDR 是否合法)。它由 Spec 驱动,写入方必须填写 ObservedGeneration。 + */ + "conditions"?: Array<{ + /** + * lastTransitionTime is the last time the condition transitioned from one status to another. + * This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + */ + "lastTransitionTime": string; + /** + * message is a human readable message indicating details about the transition. + * This may be an empty string. + */ + "message": string; + /** + * observedGeneration represents the .metadata.generation that the condition was set based upon. + * For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + * with respect to the current state of the instance. + */ + "observedGeneration"?: number; + /** + * reason contains a programmatic identifier indicating the reason for the condition's last transition. + * Producers of specific condition types may define expected values and meanings for this field, + * and whether the values are considered a guaranteed API. + * The value should be a CamelCase string. + * This field may not be empty. + */ + "reason": string; + /** + * status of the condition, one of True, False, Unknown. + */ + "status": "True" | "False" | "Unknown"; + /** + * type of condition in CamelCase or in foo.example.com/CamelCase. + */ + "type": string; + }>; + /** + * IPAllocations 由 Domain 控制器独占写入,其它组件不得修改。该列表规模随 + * Domain CIDR 增长(/16 可达数万条)。 + */ + "ipAllocations"?: Array<{ + "ip"?: string; + "job"?: string; + "pod"?: string; + "task"?: string; + }>; + /** + * ObservedGeneration 是 Domain 控制器最近一次完成调谐时所观测到的 + * metadata.generation。它是控制器契约而非 API Server 保证:消费者在依据 + * ipAllocations 做判断前,应比较本字段与 metadata.generation 以识别过期状态。 + */ + "observedGeneration"?: number; + }; +} + +export class Domain extends Model implements IDomain { + "apiVersion": IDomain["apiVersion"]; + "kind": IDomain["kind"]; + "metadata"?: IDomain["metadata"]; + "spec"?: IDomain["spec"]; + "status"?: IDomain["status"]; + +static apiVersion: IDomain["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: IDomain["kind"] = "Domain"; +static is = createTypeMetaGuard(Domain); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Domain.apiVersion, + kind: Domain.kind, + ...data + } as IDomain); +} +} + + +setValidateFunc(Domain, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/DomainPeer.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/DomainPeer.ts new file mode 100644 index 0000000..9d1fb6e --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/DomainPeer.ts @@ -0,0 +1,66 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1DomainPeer.js"; + +export interface IDomainPeer { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "DomainPeer"; + "metadata"?: IObjectMeta; + "spec"?: { + "cert"?: string; + "key"?: string; + "pods"?: Array<{ + "globalNamespace"?: string; + "ip"?: string; + "localIP"?: string; + "name"?: string; + "namespace"?: string; + "node"?: string; + "uid"?: string; + }>; + "prefixLen"?: number; + }; + "status"?: { + }; +} + +export class DomainPeer extends Model implements IDomainPeer { + "apiVersion": IDomainPeer["apiVersion"]; + "kind": IDomainPeer["kind"]; + "metadata"?: IDomainPeer["metadata"]; + "spec"?: IDomainPeer["spec"]; + "status"?: IDomainPeer["status"]; + +static apiVersion: IDomainPeer["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: IDomainPeer["kind"] = "DomainPeer"; +static is = createTypeMetaGuard(DomainPeer); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: DomainPeer.apiVersion, + kind: DomainPeer.kind, + ...data + } as IDomainPeer); +} +} + + +setValidateFunc(DomainPeer, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Job.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Job.ts new file mode 100644 index 0000000..754ee71 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Job.ts @@ -0,0 +1,7179 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1Job.js"; + +export interface IJob { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "Job"; + "metadata"?: IObjectMeta; + "spec"?: { + "domain"?: string; + "sshPublicKey"?: string; + /** + * Setting spec.suspended to true starts an orderly stop without deleting the Job resource. The Job becomes Stopped and is archived into the persistence backend after ArchiveTTL (default 5 minutes), while the Job CR is deleted from kcp. Starting the Job via POST /jobs/:name/start restores it from the persistence backend with the same name and spec but a new Kubernetes UID. + */ + "suspended"?: boolean; + "tags"?: Array<{ + "key": string; + "values": Array; + }>; + "tasks"?: Array<{ + "downstreamName"?: string; + "environments"?: Array<{ + "parameters"?: any; + "type": string; + "version": string; + }>; + "head"?: boolean; + "name"?: string; + /** + * TaskPlacementSpec describes scheduling constraints for the workload. + */ + "placement": { + "nodeSelector"?: { + [key: string]: string; + }; + }; + /** + * TaskRole 描述 Task 在业务编排中的角色,用于前端分组与展示。 + * 该字段当前不在 CRD 层做枚举校验:它可能承载上层编排框架的自定义角色名, + * 收窄取值会阻止合法的既有数据写入。请勿据此推断取值的封闭集合。 + */ + "role": string; + /** + * TaskRuntimeSpec selects the runtime implementation and instance that lowers + * the common Pod template. Name is a stable runtime instance identifier; it is + * not a display name or proof of ownership. + */ + "runtime": { + /** + * RuntimeKind 表示负责执行 Task 工作负载的 Runtime 类型。 + * CRD 有意不限制该字符串的枚举值,使 Docker、Raw 等 Runtime 可以在不修改 + * Task Schema 的情况下扩展。Agent 必须在产生任何外部副作用前,通过已注册的 + * Provider 和能力校验拒绝未知或尚未支持的 Runtime 类型。 + */ + "kind": string; + "name"?: string; + }; + "suspended"?: boolean; + "tags"?: Array<{ + "key": string; + "values": Array; + }>; + /** + * TaskWorkloadSpec is the common workload declaration for every runtime. + * Kubernetes applies the Pod template natively. Future Docker and Raw providers + * lower the subset they support and reject unsupported fields before producing + * external effects. + */ + "workload": { + /** + * TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a + * workload. Type and Version identify a carrier contract; Parameters remain + * opaque until the selected Adapter or Runtime implementation strictly decodes + * them. Carrier identifiers are open strings, not CRD enums. + */ + "carrier": { + "parameters"?: any; + "type": string; + "version": string; + }; + /** + * WorkloadKind identifies the workload semantics independently of its Runtime + * carrier. The CRD deliberately keeps this identifier open; registered + * Adapters must reject unsupported kinds before producing external effects. + */ + "kind"?: string; + "parameters"?: any; + /** + * PodTemplateSpec describes the data a pod should have when created from a template + */ + "template"?: { + /** + * Standard object's metadata. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + "metadata"?: { + "annotations"?: { + [key: string]: string; + }; + "finalizers"?: Array; + "labels"?: { + [key: string]: string; + }; + "name"?: string; + "namespace"?: string; + }; + /** + * Specification of the desired behavior of the pod. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + "spec"?: { + /** + * Optional duration in seconds the pod may be active on the node relative to + * StartTime before the system will actively try to mark it failed and kill associated containers. + * Value must be a positive integer. + */ + "activeDeadlineSeconds"?: number; + /** + * If specified, the pod's scheduling constraints + */ + "affinity"?: { + /** + * Describes node affinity scheduling rules for the pod. + */ + "nodeAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and adding + * "weight" to the sum if the node matches the corresponding matchExpressions; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A node selector term, associated with the corresponding weight. + */ + "preference": { + /** + * A list of node selector requirements by node's labels. + */ + "matchExpressions"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + /** + * A list of node selector requirements by node's fields. + */ + "matchFields"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + }; + /** + * Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + */ + "weight": number; + }>; + /** + * If the affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to an update), the system + * may or may not try to eventually evict the pod from its node. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: { + /** + * Required. A list of node selector terms. The terms are ORed. + */ + "nodeSelectorTerms": Array<{ + /** + * A list of node selector requirements by node's labels. + */ + "matchExpressions"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + /** + * A list of node selector requirements by node's fields. + */ + "matchFields"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + }>; + }; + }; + /** + * Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + */ + "podAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and adding + * "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * Required. A pod affinity term, associated with the corresponding weight. + */ + "podAffinityTerm": { + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }; + /** + * weight associated with matching the corresponding podAffinityTerm, + * in the range 1-100. + */ + "weight": number; + }>; + /** + * If the affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to a pod label update), the + * system may or may not try to eventually evict the pod from its node. + * When there are multiple elements, the lists of nodes corresponding to each + * podAffinityTerm are intersected, i.e. all terms must be satisfied. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }>; + }; + /** + * Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + */ + "podAntiAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the anti-affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling anti-affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and subtracting + * "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * Required. A pod affinity term, associated with the corresponding weight. + */ + "podAffinityTerm": { + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }; + /** + * weight associated with matching the corresponding podAffinityTerm, + * in the range 1-100. + */ + "weight": number; + }>; + /** + * If the anti-affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the anti-affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to a pod label update), the + * system may or may not try to eventually evict the pod from its node. + * When there are multiple elements, the lists of nodes corresponding to each + * podAffinityTerm are intersected, i.e. all terms must be satisfied. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }>; + }; + }; + /** + * AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + */ + "automountServiceAccountToken"?: boolean; + /** + * List of containers belonging to the pod. + * Containers cannot currently be added or removed. + * There must be at least one container in a Pod. + * Cannot be updated. + */ + "containers": Array<{ + /** + * 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * 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 and StatefulSets. + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Actions that the management system should take in response to container lifecycle events. + * Cannot be updated. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the container specified as a DNS_LABEL. + * Each container in a pod must have a unique name (DNS_LABEL). + * Cannot be updated. + */ + "name": string; + /** + * 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. + * 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. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Periodic probe of container service readiness. + * Container will be removed from service endpoints if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + * This field cannot be set on ephemeral containers. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Compute Resources required by this container. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. + * This overrides the pod-level restart policy. When this field is not specified, + * the restart behavior is defined by the Pod's restart policy and the container type. + * Additionally, 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. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. The rules are evaluated in + * order. Once a rule matches a container exit condition, the remaining + * rules are ignored. If no rule matches the container exit condition, + * the Container-level restart policy determines the whether the container + * is restarted or not. Constraints on the rules: + * - At most 20 rules are allowed. + * - Rules can have the same action. + * - Identical rules are not forbidden in validations. + * When rules are specified, container MUST set RestartPolicy explicitly + * even it if matches the Pod's RestartPolicy. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * SecurityContext defines the security options the container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * StartupProbe indicates that the Pod has successfully initialized. + * If specified, no other probes are executed until this completes successfully. + * If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + * This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + * when it might take a long time to load data or warm a cache, than during steady-state operation. + * This cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * Specifies the DNS parameters of a pod. + * Parameters specified here will be merged to the generated DNS + * configuration based on DNSPolicy. + */ + "dnsConfig"?: { + /** + * A list of DNS name server IP addresses. + * This will be appended to the base nameservers generated from DNSPolicy. + * Duplicated nameservers will be removed. + */ + "nameservers"?: Array; + /** + * A list of DNS resolver options. + * This will be merged with the base options generated from DNSPolicy. + * Duplicated entries will be removed. Resolution options given in Options + * will override those that appear in the base DNSPolicy. + */ + "options"?: Array<{ + /** + * Name is this DNS resolver option's name. + * Required. + */ + "name"?: string; + /** + * Value is this DNS resolver option's value. + */ + "value"?: string; + }>; + /** + * A list of DNS search domains for host-name lookup. + * This will be appended to the base search paths generated from DNSPolicy. + * Duplicated search paths will be removed. + */ + "searches"?: Array; + }; + /** + * 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 'ClusterFirstWithHostNet'. + */ + "dnsPolicy"?: string; + /** + * EnableServiceLinks indicates whether information about services should be injected into pod's + * environment variables, matching the syntax of Docker links. + * Optional: Defaults to true. + */ + "enableServiceLinks"?: boolean; + /** + * List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + * pod to perform user-initiated actions such as debugging. This list cannot be specified when + * creating a pod, and it cannot be modified by updating the pod spec. In order to add an + * ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + */ + "ephemeralContainers"?: Array<{ + /** + * Arguments to the entrypoint. + * The 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * Entrypoint array. Not executed within a shell. + * The 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * Container image name. + * More info: https://kubernetes.io/docs/concepts/containers/images + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Lifecycle is not allowed for ephemeral containers. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Probes are not allowed for ephemeral containers. + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the ephemeral container specified as a DNS_LABEL. + * This name must be unique among all containers, init containers and ephemeral containers. + */ + "name": string; + /** + * Ports are not allowed for ephemeral containers. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Probes are not allowed for ephemeral containers. + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + * already allocated to the pod. + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * Restart policy for the container to manage the restart behavior of each + * container within a pod. + * You cannot set this field on ephemeral containers. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. You cannot set this field on + * ephemeral containers. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * Optional: SecurityContext defines the security options the ephemeral container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * Probes are not allowed for ephemeral containers. + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * If set, the name of the container from PodSpec that this ephemeral container targets. + * The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + * If not set then the ephemeral container uses the namespaces configured in the Pod spec. + * + * The container runtime must implement support for this feature. If the runtime does not + * support namespace targeting then the result of setting this field is undefined. + */ + "targetContainerName"?: string; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + * file if specified. + */ + "hostAliases"?: Array<{ + /** + * Hostnames for the above IP address. + */ + "hostnames"?: Array; + /** + * IP address of the host file entry. + */ + "ip": string; + }>; + /** + * Use the host's ipc namespace. + * Optional: Default to false. + */ + "hostIPC"?: boolean; + /** + * Host networking requested for this pod. Use the host's network namespace. + * When using HostNetwork you should specify ports so the scheduler is aware. + * When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, + * and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. + * Default to false. + */ + "hostNetwork"?: boolean; + /** + * Use the host's pid namespace. + * Optional: Default to false. + */ + "hostPID"?: boolean; + /** + * Use the host's user namespace. + * Optional: Default to true. + * If set to true or not present, the pod will be run in the host user namespace, useful + * for when the pod needs a feature only available to the host user namespace, such as + * loading a kernel module with CAP_SYS_MODULE. + * When set to false, a new userns is created for the pod. Setting false is useful for + * mitigating container breakout vulnerabilities even allowing users to run their + * containers as root without actually having root privileges on the host. + */ + "hostUsers"?: boolean; + /** + * Specifies the hostname of the Pod + * If not specified, the pod's hostname will be set to a system-defined value. + */ + "hostname"?: string; + /** + * HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. + * This field only specifies the pod's hostname and does not affect its DNS records. + * When this field is set to a non-empty string: + * - It takes precedence over the values set in `hostname` and `subdomain`. + * - The Pod's hostname will be set to this value. + * - `setHostnameAsFQDN` must be nil or set to false. + * - `hostNetwork` must be set to false. + * + * This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. + * Requires the HostnameOverride feature gate to be enabled. + */ + "hostnameOverride"?: string; + /** + * ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + * If specified, these secrets will be passed to individual puller implementations for them to use. + * More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + */ + "imagePullSecrets"?: Array<{ + /** + * 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 + */ + "name"?: string; + }>; + /** + * List of initialization containers belonging to the pod. + * Init containers are executed in order prior to containers being started. If any + * init container fails, the pod is considered to have failed and is handled according + * to its restartPolicy. The name for an init container or normal container must be + * unique among all containers. + * Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + * The resourceRequirements of an init container are taken into account during scheduling + * by finding the highest request/limit for each resource type, and then using the max of + * that value or the sum of the normal containers. Limits are applied to init containers + * in a similar fashion. + * Init containers cannot currently be added or removed. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + */ + "initContainers"?: Array<{ + /** + * 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * 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 and StatefulSets. + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Actions that the management system should take in response to container lifecycle events. + * Cannot be updated. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the container specified as a DNS_LABEL. + * Each container in a pod must have a unique name (DNS_LABEL). + * Cannot be updated. + */ + "name": string; + /** + * 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. + * 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. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Periodic probe of container service readiness. + * Container will be removed from service endpoints if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + * This field cannot be set on ephemeral containers. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Compute Resources required by this container. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. + * This overrides the pod-level restart policy. When this field is not specified, + * the restart behavior is defined by the Pod's restart policy and the container type. + * Additionally, 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. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. The rules are evaluated in + * order. Once a rule matches a container exit condition, the remaining + * rules are ignored. If no rule matches the container exit condition, + * the Container-level restart policy determines the whether the container + * is restarted or not. Constraints on the rules: + * - At most 20 rules are allowed. + * - Rules can have the same action. + * - Identical rules are not forbidden in validations. + * When rules are specified, container MUST set RestartPolicy explicitly + * even it if matches the Pod's RestartPolicy. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * SecurityContext defines the security options the container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * StartupProbe indicates that the Pod has successfully initialized. + * If specified, no other probes are executed until this completes successfully. + * If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + * This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + * when it might take a long time to load data or warm a cache, than during steady-state operation. + * This cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * NodeName indicates in which node this pod is scheduled. + * If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. + * Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. + * This field should not be used to express a desire for the pod to be scheduled on a specific node. + * https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + */ + "nodeName"?: string; + /** + * NodeSelector is a selector which must be true for the pod to fit on a node. + * Selector which must match a node's labels for the pod to be scheduled on that node. + * More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + */ + "nodeSelector"?: { + [key: string]: string; + }; + /** + * Specifies the OS of the containers in the pod. + * Some pod and container fields are restricted if this is set. + * + * If the OS field is set to linux, the following fields must be unset: + * -securityContext.windowsOptions + * + * If the OS field is set to windows, following fields must be unset: + * - spec.hostPID + * - spec.hostIPC + * - spec.hostUsers + * - spec.resources + * - spec.securityContext.appArmorProfile + * - spec.securityContext.seLinuxOptions + * - spec.securityContext.seccompProfile + * - spec.securityContext.fsGroup + * - spec.securityContext.fsGroupChangePolicy + * - spec.securityContext.sysctls + * - spec.shareProcessNamespace + * - spec.securityContext.runAsUser + * - spec.securityContext.runAsGroup + * - spec.securityContext.supplementalGroups + * - spec.securityContext.supplementalGroupsPolicy + * - spec.containers[\*].securityContext.appArmorProfile + * - spec.containers[\*].securityContext.seLinuxOptions + * - spec.containers[\*].securityContext.seccompProfile + * - spec.containers[\*].securityContext.capabilities + * - spec.containers[\*].securityContext.readOnlyRootFilesystem + * - spec.containers[\*].securityContext.privileged + * - spec.containers[\*].securityContext.allowPrivilegeEscalation + * - spec.containers[\*].securityContext.procMount + * - spec.containers[\*].securityContext.runAsUser + * - spec.containers[\*].securityContext.runAsGroup + */ + "os"?: { + /** + * Name is the name of the operating system. The currently supported values are linux and windows. + * Additional value may be defined in future and can be one of: + * https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + * Clients should expect to handle additional values and treat unrecognized values in this field as os: null + */ + "name": string; + }; + /** + * Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + * This field will be autopopulated at admission time by the RuntimeClass admission controller. If + * the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + * The RuntimeClass admission controller will reject Pod create requests which have the overhead already + * set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + * defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + * More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + */ + "overhead"?: { + [key: string]: number | string; + }; + /** + * PreemptionPolicy is the Policy for preempting pods with lower priority. + * One of Never, PreemptLowerPriority. + * Defaults to PreemptLowerPriority if unset. + */ + "preemptionPolicy"?: string; + /** + * The priority value. Various system components use this field to find the + * priority of the pod. When Priority Admission Controller is enabled, it + * prevents users from setting this field. The admission controller populates + * this field from PriorityClassName. + * The higher the value, the higher the priority. + */ + "priority"?: number; + /** + * If specified, indicates the pod's priority. "system-node-critical" and + * "system-cluster-critical" are two special keywords which indicate the + * highest priorities with the former being the highest priority. Any other + * name must be defined by creating a PriorityClass object with that name. + * If not specified, the pod priority will be default or zero if there is no + * default. + */ + "priorityClassName"?: string; + /** + * If specified, all readiness gates will be evaluated for pod readiness. + * A pod is ready when all its containers are ready AND + * all conditions specified in the readiness gates have status equal to "True" + * More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + */ + "readinessGates"?: Array<{ + /** + * ConditionType refers to a condition in the pod's condition list with matching type. + */ + "conditionType": string; + }>; + /** + * ResourceClaims defines which ResourceClaims must be allocated + * and reserved before the Pod is allowed to start. The resources + * will be made available to those containers which consume them + * by name. + * + * This is a stable field but requires that the + * DynamicResourceAllocation feature gate is enabled. + * + * This field is immutable. + */ + "resourceClaims"?: Array<{ + /** + * Name uniquely identifies this resource claim inside the pod. + * This must be a DNS_LABEL. + */ + "name": string; + /** + * ResourceClaimName is the name of a ResourceClaim object in the same + * namespace as this pod. + * + * Exactly one of ResourceClaimName and ResourceClaimTemplateName must + * be set. + */ + "resourceClaimName"?: string; + /** + * ResourceClaimTemplateName is the name of a ResourceClaimTemplate + * object in the same namespace as this pod. + * + * The template will be used to create a new ResourceClaim, which will + * be bound to this pod. When this pod is deleted, the ResourceClaim + * will also be deleted. The pod name and resource name, along with a + * generated component, will be used to form a unique name for the + * ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + * + * When the DRAWorkloadResourceClaims feature gate is enabled and the pod + * belongs to a PodGroup that defines a PodGroupResourceClaim with the same + * Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the + * ResourceClaim generated for the PodGroup. All pods in the group that + * define an equivalent PodResourceClaim matching the + * PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same + * generated ResourceClaim. ResourceClaims generated for a PodGroup are + * owned by the PodGroup and their lifecycles are tied to the PodGroup + * instead of any individual pod. + * + * This field is immutable and no changes will be made to the + * corresponding ResourceClaim by the control plane after creating the + * ResourceClaim. + * + * Exactly one of ResourceClaimName and ResourceClaimTemplateName must + * be set. + */ + "resourceClaimTemplateName"?: string; + }>; + /** + * Resources is the total amount of CPU and Memory resources required by all + * containers in the pod. It supports specifying Requests and Limits for + * "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. + * + * This field enables fine-grained control over resource allocation for the + * entire pod, allowing resource sharing among containers in a pod. + * + * This is an alpha field and requires enabling the PodLevelResources feature + * gate. + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * Restart policy for all containers within the pod. + * One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. + * Default to Always. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + */ + "restartPolicy"?: string; + /** + * RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + * to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + * If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + * empty definition that uses the default runtime handler. + * More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + */ + "runtimeClassName"?: string; + /** + * If specified, the pod will be dispatched by specified scheduler. + * If not specified, the pod will be dispatched by default scheduler. + */ + "schedulerName"?: string; + /** + * SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + * If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the + * scheduler will not attempt to schedule the pod. + * + * SchedulingGates can only be set at pod creation time, and be removed only afterwards. + */ + "schedulingGates"?: Array<{ + /** + * Name of the scheduling gate. + * Each scheduling gate must have a unique name field. + */ + "name": string; + }>; + /** + * SchedulingGroup provides a reference to the immediate scheduling runtime + * grouping object that this Pod belongs to. + * This field is used by the scheduler to identify the group and apply the + * correct group scheduling policies. The association with a group also + * impacts other lifecycle aspects of a Pod that are relevant in a wider context + * of scheduling like preemption, resource attachment, etc. If not specified, + * the Pod is treated as a single unit in all of these aspects. + * The group object referenced by this field may not exist at the time the + * Pod is created. + * This field is immutable, but a group object with the same name may be + * recreated with different policies. Doing this during pod scheduling + * may result in the placement not conforming to the expected policies. + */ + "schedulingGroup"?: { + /** + * PodGroupName specifies the name of the standalone PodGroup object + * that represents the runtime instance of this group. + * Must be a DNS subdomain. + */ + "podGroupName"?: string; + }; + /** + * SecurityContext holds pod-level security attributes and common container settings. + * Optional: Defaults to empty. See type description for default values of each field. + */ + "securityContext"?: { + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * A special supplemental group that applies to all containers in a pod. + * Some volume types allow the Kubelet to change the ownership of that volume + * to be owned by the pod: + * + * 1. The owning GID will be the FSGroup + * 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + * 3. The permission bits are OR'd with rw-rw---- + * + * If unset, the Kubelet will not modify the ownership and permissions of any volume. + * Note that this field cannot be set when spec.os.name is windows. + */ + "fsGroup"?: number; + /** + * fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + * before being exposed inside Pod. This field will only apply to + * volume types which support fsGroup based ownership(and permissions). + * It will have no effect on ephemeral volume types such as: secret, configmaps + * and emptydir. + * Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + * Note that this field cannot be set when spec.os.name is windows. + */ + "fsGroupChangePolicy"?: string; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence + * for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence + * for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + * It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + * Valid values are "MountOption" and "Recursive". + * + * "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + * This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + * + * "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + * This requires all Pods that share the same volume to use the same SELinux label. + * It is not possible to share the same volume among privileged and unprivileged Pods. + * Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + * whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + * CSIDriver instance. Other volumes are always re-labelled recursively. + * "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + * + * If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + * If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + * and "Recursive" for all other volumes. + * + * This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + * + * All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxChangePolicy"?: string; + /** + * The SELinux context to be applied to all containers. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in SecurityContext. If set in + * both SecurityContext and PodSecurityContext, the value specified in SecurityContext + * takes precedence for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by the containers in this pod. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * A list of groups applied to the first process run in each container, in + * addition to the container's primary GID and fsGroup (if specified). If + * the SupplementalGroupsPolicy feature is enabled, the + * supplementalGroupsPolicy field determines whether these are in addition + * to or instead of any group memberships defined in the container image. + * If unspecified, no additional groups are added, though group memberships + * defined in the container image may still be used, depending on the + * supplementalGroupsPolicy field. + * Note that this field cannot be set when spec.os.name is windows. + */ + "supplementalGroups"?: Array; + /** + * Defines how supplemental groups of the first container processes are calculated. + * Valid values are "Merge" and "Strict". If not specified, "Merge" is used. + * (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled + * and the container runtime must implement support for this feature. + * Note that this field cannot be set when spec.os.name is windows. + */ + "supplementalGroupsPolicy"?: string; + /** + * Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + * sysctls (by the container runtime) might fail to launch. + * Note that this field cannot be set when spec.os.name is windows. + */ + "sysctls"?: Array<{ + /** + * Name of a property to set + */ + "name": string; + /** + * Value of a property to set + */ + "value": string; + }>; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options within a container's SecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. + * Deprecated: Use serviceAccountName instead. + */ + "serviceAccount"?: string; + /** + * ServiceAccountName is the name of the ServiceAccount to use to run this pod. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + */ + "serviceAccountName"?: string; + /** + * If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + * In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + * In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + * If a pod does not have FQDN, this has no effect. + * Default to false. + */ + "setHostnameAsFQDN"?: boolean; + /** + * Share a single process namespace between all of the containers in a pod. + * When this is set containers will be able to view and signal processes from other containers + * in the same pod, and the first process in each container will not be assigned PID 1. + * HostPID and ShareProcessNamespace cannot both be set. + * Optional: Default to false. + */ + "shareProcessNamespace"?: boolean; + /** + * If specified, the fully qualified Pod hostname will be "...svc.". + * If not specified, the pod will not have a domainname at all. + */ + "subdomain"?: string; + /** + * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * If this value is nil, the default grace period will be used instead. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * Defaults to 30 seconds. + */ + "terminationGracePeriodSeconds"?: number; + /** + * If specified, the pod's tolerations. + */ + "tolerations"?: Array<{ + /** + * Effect indicates the taint effect to match. Empty means match all taint effects. + * When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + */ + "effect"?: string; + /** + * Key is the taint key that the toleration applies to. Empty means match all taint keys. + * If the key is empty, operator must be Exists; this combination means to match all values and all keys. + */ + "key"?: string; + /** + * Operator represents a key's relationship to the value. + * Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. + * Exists is equivalent to wildcard for value, so that a pod can + * tolerate all taints of a particular category. + * Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + */ + "operator"?: string; + /** + * TolerationSeconds represents the period of time the toleration (which must be + * of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + * it is not set, which means tolerate the taint forever (do not evict). Zero and + * negative values will be treated as 0 (evict immediately) by the system. + */ + "tolerationSeconds"?: number; + /** + * Value is the taint value the toleration matches to. + * If the operator is Exists, the value should be empty, otherwise just a regular string. + */ + "value"?: string; + }>; + /** + * TopologySpreadConstraints describes how a group of pods ought to spread across topology + * domains. Scheduler will schedule pods in a way which abides by the constraints. + * All topologySpreadConstraints are ANDed. + */ + "topologySpreadConstraints"?: Array<{ + /** + * LabelSelector is used to find matching pods. + * Pods that match this label selector are counted to determine the number of pods + * in their corresponding topology domain. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * MatchLabelKeys is a set of pod label keys to select the pods over which + * spreading will be calculated. The keys are used to lookup values from the + * incoming pod labels, those key-value labels are ANDed with labelSelector + * to select the group of existing pods over which spreading will be calculated + * for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. + * MatchLabelKeys cannot be set when LabelSelector isn't set. + * Keys that don't exist in the incoming pod labels will + * be ignored. A null or empty list means only match against labelSelector. + * + * This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + */ + "matchLabelKeys"?: Array; + /** + * MaxSkew describes the degree to which pods may be unevenly distributed. + * When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + * between the number of matching pods in the target topology and the global minimum. + * The global minimum is the minimum number of matching pods in an eligible domain + * or zero if the number of eligible domains is less than MinDomains. + * For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + * labelSelector spread as 2/2/1: + * In this case, the global minimum is 1. + * | zone1 | zone2 | zone3 | + * | P P | P P | P | + * - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; + * scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + * violate MaxSkew(1). + * - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + * When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + * to topologies that satisfy it. + * It's a required field. Default value is 1 and 0 is not allowed. + */ + "maxSkew": number; + /** + * MinDomains indicates a minimum number of eligible domains. + * When the number of eligible domains with matching topology keys is less than minDomains, + * Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. + * And when the number of eligible domains with matching topology keys equals or greater than minDomains, + * this value has no effect on scheduling. + * As a result, when the number of eligible domains is less than minDomains, + * scheduler won't schedule more than maxSkew Pods to those domains. + * If value is nil, the constraint behaves as if MinDomains is equal to 1. + * Valid values are integers greater than 0. + * When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + * + * For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same + * labelSelector spread as 2/2/2: + * | zone1 | zone2 | zone3 | + * | P P | P P | P P | + * The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. + * In this situation, new pod with the same labelSelector cannot be scheduled, + * because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, + * it will violate MaxSkew. + */ + "minDomains"?: number; + /** + * NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector + * when calculating pod topology spread skew. Options are: + * - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. + * - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + * + * If this value is nil, the behavior is equivalent to the Honor policy. + */ + "nodeAffinityPolicy"?: string; + /** + * NodeTaintsPolicy indicates how we will treat node taints when calculating + * pod topology spread skew. Options are: + * - Honor: nodes without taints, along with tainted nodes for which the incoming pod + * has a toleration, are included. + * - Ignore: node taints are ignored. All nodes are included. + * + * If this value is nil, the behavior is equivalent to the Ignore policy. + */ + "nodeTaintsPolicy"?: string; + /** + * TopologyKey is the key of node labels. Nodes that have a label with this key + * and identical values are considered to be in the same topology. + * We consider each as a "bucket", and try to put balanced number + * of pods into each bucket. + * We define a domain as a particular instance of a topology. + * Also, we define an eligible domain as a domain whose nodes meet the requirements of + * nodeAffinityPolicy and nodeTaintsPolicy. + * e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. + * And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. + * It's a required field. + */ + "topologyKey": string; + /** + * WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + * the spread constraint. + * - DoNotSchedule (default) tells the scheduler not to schedule it. + * - ScheduleAnyway tells the scheduler to schedule the pod in any location, + * but giving higher precedence to topologies that would help reduce the + * skew. + * A constraint is considered "Unsatisfiable" for an incoming pod + * if and only if every possible node assignment for that pod would violate + * "MaxSkew" on some topology. + * For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + * labelSelector spread as 3/1/1: + * | zone1 | zone2 | zone3 | + * | P P P | P | P | + * If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + * to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + * MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + * won't make it \*more\* imbalanced. + * It's a required field. + */ + "whenUnsatisfiable": string; + }>; + /** + * List of volumes that can be mounted by containers belonging to the pod. + * More info: https://kubernetes.io/docs/concepts/storage/volumes + */ + "volumes"?: Array<{ + /** + * awsElasticBlockStore represents an AWS Disk resource that is attached to a + * kubelet's host machine and then exposed to the pod. + * Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + * awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "awsElasticBlockStore"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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). + */ + "partition"?: number; + /** + * readOnly value true will force the readOnly setting in VolumeMounts. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "readOnly"?: boolean; + /** + * volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "volumeID": string; + }; + /** + * azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + * Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + * are redirected to the disk.csi.azure.com CSI driver. + */ + "azureDisk"?: { + /** + * cachingMode is the Host Caching mode: None, Read Only, Read Write. + */ + "cachingMode"?: string; + /** + * diskName is the Name of the data disk in the blob storage + */ + "diskName": string; + /** + * diskURI is the URI of data disk in the blob storage + */ + "diskURI": string; + /** + * 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. + */ + "fsType"?: string; + /** + * 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 + */ + "kind"?: string; + /** + * readOnly Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + }; + /** + * azureFile represents an Azure File Service mount on the host and bind mount to the pod. + * Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + * are redirected to the file.csi.azure.com CSI driver. + */ + "azureFile"?: { + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretName is the name of secret that contains Azure Storage Account Name and Key + */ + "secretName": string; + /** + * shareName is the azure share Name + */ + "shareName": string; + }; + /** + * cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + * Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. + */ + "cephfs"?: { + /** + * monitors is Required: Monitors is a collection of Ceph monitors + * More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + */ + "monitors": Array; + /** + * path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + */ + "path"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * 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 + */ + "secretFile"?: string; + /** + * 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 + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * 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 + */ + "user"?: string; + }; + /** + * cinder represents a cinder volume attached and mounted on kubelets host machine. + * Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + * are redirected to the cinder.csi.openstack.org CSI driver. + * More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "cinder"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * secretRef is optional: points to a secret object containing parameters used to connect + * to OpenStack. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * volumeID used to identify the volume in cinder. + * More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "volumeID": string; + }; + /** + * configMap represents a configMap that should populate this volume + */ + "configMap"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * 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 keys will not be + * present. If a key is specified which is not present in the ConfigMap, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; + }; + /** + * csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers. + */ + "csi"?: { + /** + * 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. + */ + "driver": string; + /** + * 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. + */ + "fsType"?: string; + /** + * 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 object contains more than one secret, all secret references are passed. + */ + "nodePublishSecretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * readOnly specifies a read-only configuration for the volume. + * Defaults to false (read/write). + */ + "readOnly"?: boolean; + /** + * volumeAttributes stores driver-specific properties that are passed to the CSI + * driver. Consult your driver's documentation for supported values. + */ + "volumeAttributes"?: { + [key: string]: string; + }; + }; + /** + * downwardAPI represents downward API about the pod that should populate this volume + */ + "downwardAPI"?: { + /** + * Optional: mode bits to use on created files by default. Must be a + * 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. + */ + "defaultMode"?: number; + /** + * Items is a list of downward API volume file + */ + "items"?: Array<{ + /** + * Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + */ + "path": string; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + }>; + }; + /** + * emptyDir represents a temporary directory that shares a pod's lifetime. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + */ + "emptyDir"?: { + /** + * 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 + */ + "medium"?: string; + /** + * 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 + */ + "sizeLimit"?: number | string; + }; + /** + * ephemeral represents a volume that is handled by a cluster storage driver. + * The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + * and deleted when the pod is removed. + * + * Use this if: + * a) the volume is only needed while the pod runs, + * b) features of normal volumes like restoring from snapshot or capacity + * tracking are needed, + * c) the storage driver is specified through a storage class, and + * d) the storage driver supports dynamic volume provisioning through + * a PersistentVolumeClaim (see EphemeralVolumeSource for more + * information on the connection between this volume type + * and PersistentVolumeClaim). + * + * Use PersistentVolumeClaim or one of the vendor-specific + * APIs for volumes that persist for longer than the lifecycle + * of an individual pod. + * + * Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + * be used that way - see the documentation of the driver for + * more information. + * + * A pod can use both types of ephemeral volumes and + * persistent volumes at the same time. + */ + "ephemeral"?: { + /** + * Will be used to create a stand-alone PVC to provision the volume. + * The pod in which this EphemeralVolumeSource is embedded will be the + * owner of the PVC, i.e. the PVC will be deleted together with the + * pod. The name of the PVC will be `-` where + * `` is the name from the `PodSpec.Volumes` array + * entry. Pod validation will reject the pod if the concatenated name + * is not valid for a PVC (for example, too long). + * + * An existing PVC with that name that is not owned by the pod + * will \*not\* be used for the pod to avoid using an unrelated + * volume by mistake. Starting the pod is then blocked until + * the unrelated PVC is removed. If such a pre-created PVC is + * meant to be used by the pod, the PVC has to updated with an + * owner reference to the pod once the pod exists. Normally + * this should not be necessary, but it may be useful when + * manually reconstructing a broken cluster. + * + * This field is read-only and no changes will be made by Kubernetes + * to the PVC after it has been created. + * + * Required, must not be nil. + */ + "volumeClaimTemplate"?: { + /** + * May contain labels and annotations that will be copied into the PVC + * when creating it. No other fields are allowed and will be rejected during + * validation. + */ + "metadata"?: { + "annotations"?: { + [key: string]: string; + }; + "finalizers"?: Array; + "labels"?: { + [key: string]: string; + }; + "name"?: string; + "namespace"?: string; + }; + /** + * The specification for the PersistentVolumeClaim. The entire content is + * copied unchanged into the PVC that gets created from this + * template. The same fields as in a PersistentVolumeClaim + * are also valid here. + */ + "spec": { + /** + * accessModes contains the desired access modes the volume should have. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + */ + "accessModes"?: Array; + /** + * 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. + */ + "dataSource"?: { + /** + * APIGroup is the group for the resource being referenced. + * If APIGroup is not specified, the specified Kind must be in the core API group. + * For any other third-party types, APIGroup is required. + */ + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; + }; + /** + * 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. + * 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 + * allows any non-core object, as well as PersistentVolumeClaim objects. + * \* While dataSource ignores disallowed values (dropping them), dataSourceRef + * preserves all values, and generates an error if a disallowed value is + * specified. + * \* While dataSource only allows local objects, dataSourceRef allows objects + * in any namespaces. + * (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. + */ + "dataSourceRef"?: { + /** + * APIGroup is the group for the resource being referenced. + * If APIGroup is not specified, the specified Kind must be in the core API group. + * For any other third-party types, APIGroup is required. + */ + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; + /** + * Namespace is the namespace of 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. + */ + "namespace"?: string; + }; + /** + * resources represents the minimum resources the volume should have. + * 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 the claim. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + */ + "resources"?: { + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * selector is a label query over volumes to consider for binding. + */ + "selector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * storageClassName is the name of the StorageClass required by the claim. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + */ + "storageClassName"?: string; + /** + * 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 or nil value indicates that no + * VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, + * this field can be reset to its previous value (including nil) to cancel the modification. + * 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/ + */ + "volumeAttributesClassName"?: string; + /** + * volumeMode defines what type of volume is required by the claim. + * Value of Filesystem is implied when not included in claim spec. + */ + "volumeMode"?: string; + /** + * volumeName is the binding reference to the PersistentVolume backing this claim. + */ + "volumeName"?: string; + }; + }; + }; + /** + * fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + */ + "fc"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * lun is Optional: FC target lun number + */ + "lun"?: number; + /** + * readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * targetWWNs is Optional: FC target worldwide names (WWNs) + */ + "targetWWNs"?: Array; + /** + * wwids Optional: FC volume world wide identifiers (wwids) + * Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + */ + "wwids"?: Array; + }; + /** + * flexVolume represents a generic volume resource that is + * provisioned/attached using an exec based plugin. + * Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + */ + "flexVolume"?: { + /** + * driver is the name of the driver to use for this volume. + */ + "driver": string; + /** + * 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. + */ + "fsType"?: string; + /** + * options is Optional: this field holds extra command options if any. + */ + "options"?: { + [key: string]: string; + }; + /** + * readOnly is Optional: defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * 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. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + }; + /** + * flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + * Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + */ + "flocker"?: { + /** + * datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + * should be considered as deprecated + */ + "datasetName"?: string; + /** + * datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + */ + "datasetUUID"?: string; + }; + /** + * gcePersistentDisk represents a GCE Disk resource that is attached to a + * kubelet's host machine and then exposed to the pod. + * Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + * gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + */ + "gcePersistentDisk"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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 + */ + "partition"?: number; + /** + * 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 + */ + "pdName": string; + /** + * readOnly here will force the ReadOnly setting in VolumeMounts. + * Defaults to false. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + */ + "readOnly"?: boolean; + }; + /** + * 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. + */ + "gitRepo"?: { + /** + * 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. + */ + "directory"?: string; + /** + * repository is the URL + */ + "repository": string; + /** + * revision is the commit hash for the specified revision. + */ + "revision"?: string; + }; + /** + * glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + * Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + */ + "glusterfs"?: { + /** + * endpoints is the endpoint name that details Glusterfs topology. + */ + "endpoints": string; + /** + * path is the Glusterfs volume path. + * More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + */ + "path": string; + /** + * 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 + */ + "readOnly"?: boolean; + }; + /** + * 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: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + */ + "hostPath"?: { + /** + * 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 + */ + "path": string; + /** + * type for HostPath Volume + * Defaults to "" + * More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + */ + "type"?: string; + }; + /** + * image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. + * The volume is resolved at pod startup depending on which PullPolicy value is provided: + * + * - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + * - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + * - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + * + * The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. + * A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. + * The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. + * The OCI object gets mounted in a single directory (spec.containers[\*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. + * The volume will be mounted read-only (ro). + * Sub path mounts for containers are not supported (spec.containers[\*].volumeMounts.subpath) before 1.33. + * The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. + */ + "image"?: { + /** + * Policy for pulling OCI objects. Possible values are: + * Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + * Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + * IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + * Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + */ + "pullPolicy"?: string; + /** + * Required: Image or artifact reference to be used. + * Behaves in the same way as pod.spec.containers[\*].image. + * Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. + * 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 and StatefulSets. + */ + "reference"?: string; + }; + /** + * iscsi represents an ISCSI 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/#iscsi + */ + "iscsi"?: { + /** + * chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + */ + "chapAuthDiscovery"?: boolean; + /** + * chapAuthSession defines whether support iSCSI Session CHAP authentication + */ + "chapAuthSession"?: boolean; + /** + * 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 + */ + "fsType"?: string; + /** + * initiatorName is the custom iSCSI Initiator Name. + * If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + * : will be created for the connection. + */ + "initiatorName"?: string; + /** + * iqn is the target iSCSI Qualified Name. + */ + "iqn": string; + /** + * iscsiInterface is the interface Name that uses an iSCSI transport. + * Defaults to 'default' (tcp). + */ + "iscsiInterface"?: string; + /** + * lun represents iSCSI Target Lun number. + */ + "lun": number; + /** + * 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). + */ + "portals"?: Array; + /** + * readOnly here will force the ReadOnly setting in VolumeMounts. + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * secretRef is the CHAP Secret for iSCSI target and initiator authentication + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * 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). + */ + "targetPortal": string; + }; + /** + * 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 + */ + "name": string; + /** + * nfs represents an NFS mount on the host that shares a pod's lifetime + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "nfs"?: { + /** + * path that is exported by the NFS server. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "path": string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * server is the hostname or IP address of the NFS server. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "server": string; + }; + /** + * persistentVolumeClaimVolumeSource represents a reference to a + * PersistentVolumeClaim in the same namespace. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + */ + "persistentVolumeClaim"?: { + /** + * 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 + */ + "claimName": string; + /** + * readOnly Will force the ReadOnly setting in VolumeMounts. + * Default false. + */ + "readOnly"?: boolean; + }; + /** + * photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + * Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. + */ + "photonPersistentDisk"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * pdID is the ID that identifies Photon Controller persistent disk + */ + "pdID": string; + }; + /** + * portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + * Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + * are redirected to the pxd.portworx.com CSI driver. + */ + "portworxVolume"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * volumeID uniquely identifies a Portworx volume + */ + "volumeID": string; + }; + /** + * projected items for all in one resources secrets, configmaps, and downward API + */ + "projected"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * sources is the list of volume projections. Each entry in this list + * handles one source. + */ + "sources"?: Array<{ + /** + * ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field + * of ClusterTrustBundle objects in an auto-updating file. + * + * Alpha, gated by the ClusterTrustBundleProjection feature gate. + * + * ClusterTrustBundle objects can either be selected by name, or by the + * combination of signer name and a label selector. + * + * Kubelet 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. + */ + "clusterTrustBundle"?: { + /** + * 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". + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * Select a single ClusterTrustBundle by object name. Mutually-exclusive + * with signerName and labelSelector. + */ + "name"?: string; + /** + * 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. + */ + "optional"?: boolean; + /** + * Relative path from the volume root to write the bundle. + */ + "path": string; + /** + * Select all ClusterTrustBundles that match this signer name. + * Mutually-exclusive with name. The contents of all selected + * ClusterTrustBundles will be unified and deduplicated. + */ + "signerName"?: string; + }; + /** + * configMap information about the configMap data to project + */ + "configMap"?: { + /** + * 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 keys will not be + * present. If a key is specified which is not present in the ConfigMap, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; + }; + /** + * downwardAPI information about the downwardAPI data to project + */ + "downwardAPI"?: { + /** + * Items is a list of DownwardAPIVolume file + */ + "items"?: Array<{ + /** + * Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + */ + "path": string; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + }>; + }; + /** + * Projects an auto-rotating credential bundle (private key and certificate + * chain) that the pod can use either as a TLS client or server. + * + * Kubelet generates a private key and uses it to send a + * PodCertificateRequest to the named signer. Once the signer approves the + * request and issues a certificate chain, Kubelet writes the key and + * certificate chain to the pod filesystem. The pod does not start until + * certificates have been issued for each podCertificate projected volume + * source in its spec. + * + * Kubelet will begin trying to rotate the certificate at the time indicated + * by the signer using the PodCertificateRequest.Status.BeginRefreshAt + * timestamp. + * + * Kubelet can write a single file, indicated by the credentialBundlePath + * field, or separate files, indicated by the keyPath and + * certificateChainPath fields. + * + * The credential bundle is a single file in PEM format. The first PEM + * entry is the private key (in PKCS#8 format), and the remaining PEM + * entries are the certificate chain issued by the signer (typically, + * signers will return their certificate chain in leaf-to-root order). + * + * Prefer using the credential bundle format, since your application code + * can read it atomically. If you use keyPath and certificateChainPath, + * your application must make two separate file reads. If these coincide + * with a certificate rotation, it is possible that the private key and leaf + * certificate you read may not correspond to each other. Your application + * will need to check for this condition, and re-read until they are + * consistent. + * + * The named signer controls chooses the format of the certificate it + * issues; consult the signer implementation's documentation to learn how to + * use the certificates it issues. + */ + "podCertificate"?: { + /** + * Write the certificate chain at this path in the projected volume. + * + * Most applications should use credentialBundlePath. When using keyPath + * and certificateChainPath, your application needs to check that the key + * and leaf certificate are consistent, because it is possible to read the + * files mid-rotation. + */ + "certificateChainPath"?: string; + /** + * Write the credential bundle at this path in the projected volume. + * + * The credential bundle is a single file that contains multiple PEM blocks. + * The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private + * key. + * + * The remaining blocks are CERTIFICATE blocks, containing the issued + * certificate chain from the signer (leaf and any intermediates). + * + * Using credentialBundlePath lets your Pod's application code make a single + * atomic read that retrieves a consistent key and certificate chain. If you + * project them to separate files, your application code will need to + * additionally check that the leaf certificate was issued to the key. + */ + "credentialBundlePath"?: string; + /** + * Write the key at this path in the projected volume. + * + * Most applications should use credentialBundlePath. When using keyPath + * and certificateChainPath, your application needs to check that the key + * and leaf certificate are consistent, because it is possible to read the + * files mid-rotation. + */ + "keyPath"?: string; + /** + * The type of keypair Kubelet will generate for the pod. + * + * Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", + * "ECDSAP521", and "ED25519". + */ + "keyType": string; + /** + * maxExpirationSeconds is the maximum lifetime permitted for the + * certificate. + * + * Kubelet copies this value verbatim into the PodCertificateRequests it + * generates for this projection. + * + * If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + * will reject values shorter than 3600 (1 hour). The maximum allowable + * value is 7862400 (91 days). + * + * The signer implementation is then free to issue a certificate with any + * lifetime \*shorter\* than MaxExpirationSeconds, but no shorter than 3600 + * seconds (1 hour). This constraint is enforced by kube-apiserver. + * `kubernetes.io` signers will never issue certificates with a lifetime + * longer than 24 hours. + */ + "maxExpirationSeconds"?: number; + /** + * Kubelet's generated CSRs will be addressed to this signer. + */ + "signerName": string; + /** + * userAnnotations allow pod authors to pass additional information to + * the signer implementation. Kubernetes does not restrict or validate this + * metadata in any way. + * + * These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of + * the PodCertificateRequest objects that Kubelet creates. + * + * Entries are subject to the same validation as object metadata annotations, + * with the addition that all keys must be domain-prefixed. No restrictions + * are placed on values, except an overall size limitation on the entire field. + * + * Signers should document the keys and values they support. Signers should + * deny requests that contain keys they do not recognize. + */ + "userAnnotations"?: { + [key: string]: string; + }; + }; + /** + * secret information about the secret data to project + */ + "secret"?: { + /** + * 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 will not be + * present. If a key is specified which is not present in the Secret, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional field specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + /** + * serviceAccountToken is information about the serviceAccountToken data to project + */ + "serviceAccountToken"?: { + /** + * 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. + */ + "audience"?: string; + /** + * 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 percent of + * its time to live or if the token is older than 24 hours.Defaults to 1 hour + * and must be at least 10 minutes. + */ + "expirationSeconds"?: number; + /** + * path is the path relative to the mount point of the file to project the + * token into. + */ + "path": string; + }; + }>; + }; + /** + * quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + * Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + */ + "quobyte"?: { + /** + * group to map volume access to + * Default is no group + */ + "group"?: string; + /** + * readOnly here will force the Quobyte volume to be mounted with read-only permissions. + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * 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 + */ + "registry": string; + /** + * tenant owning the given Quobyte volume in the Backend + * Used with dynamically provisioned Quobyte volumes, value is set by the plugin + */ + "tenant"?: string; + /** + * user to map volume access to + * Defaults to serivceaccount user + */ + "user"?: string; + /** + * volume is a string that references an already created Quobyte volume by name. + */ + "volume": string; + }; + /** + * rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + * Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + */ + "rbd"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * image is the rados image name. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "image": string; + /** + * 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 + */ + "keyring"?: string; + /** + * monitors is a collection of Ceph monitors. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "monitors": Array; + /** + * pool is the rados pool name. + * Default is rbd. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "pool"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * 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 + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * user is the rados user name. + * Default is admin. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "user"?: string; + }; + /** + * scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + * Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + */ + "scaleIO"?: { + /** + * 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". + */ + "fsType"?: string; + /** + * gateway is the host address of the ScaleIO API Gateway. + */ + "gateway": string; + /** + * protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + */ + "protectionDomain"?: string; + /** + * readOnly Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretRef references to the secret for ScaleIO user and other + * sensitive information. If this is not provided, Login operation will fail. + */ + "secretRef": { + /** + * 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 + */ + "name"?: string; + }; + /** + * sslEnabled Flag enable/disable SSL communication with Gateway, default false + */ + "sslEnabled"?: boolean; + /** + * storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + * Default is ThinProvisioned. + */ + "storageMode"?: string; + /** + * storagePool is the ScaleIO Storage Pool associated with the protection domain. + */ + "storagePool"?: string; + /** + * system is the name of the storage system as configured in ScaleIO. + */ + "system": string; + /** + * volumeName is the name of a volume already created in the ScaleIO system + * that is associated with this volume source. + */ + "volumeName"?: string; + }; + /** + * secret represents a secret that should populate this volume. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + */ + "secret"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * 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 will not be + * present. If a key is specified which is not present in the Secret, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * optional field specify whether the Secret or its keys must be defined + */ + "optional"?: boolean; + /** + * secretName is the name of the secret in the pod's namespace to use. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + */ + "secretName"?: string; + }; + /** + * storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + * Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + */ + "storageos"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretRef specifies the secret to use for obtaining the StorageOS API + * credentials. If not specified, default values will be attempted. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * volumeName is the human-readable name of the StorageOS volume. Volume + * names are only unique within a namespace. + */ + "volumeName"?: string; + /** + * 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 override the default behaviour. + * Set to "default" if you are not using namespaces within StorageOS. + * Namespaces that do not pre-exist within StorageOS will be created. + */ + "volumeNamespace"?: string; + }; + /** + * vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + * Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + * are redirected to the csi.vsphere.vmware.com CSI driver. + */ + "vsphereVolume"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + */ + "storagePolicyID"?: string; + /** + * storagePolicyName is the storage Policy Based Management (SPBM) profile name. + */ + "storagePolicyName"?: string; + /** + * volumePath is the path that identifies vSphere volume vmdk + */ + "volumePath": string; + }; + }>; + }; + }; + "version": string; + }; + }>; + }; + "status"?: { + "conditions"?: Array<{ + /** + * lastTransitionTime is the last time the condition transitioned from one status to another. + * This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + */ + "lastTransitionTime": string; + /** + * message is a human readable message indicating details about the transition. + * This may be an empty string. + */ + "message": string; + /** + * observedGeneration represents the .metadata.generation that the condition was set based upon. + * For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + * with respect to the current state of the instance. + */ + "observedGeneration"?: number; + /** + * reason contains a programmatic identifier indicating the reason for the condition's last transition. + * Producers of specific condition types may define expected values and meanings for this field, + * and whether the values are considered a guaranteed API. + * The value should be a CamelCase string. + * This field may not be empty. + */ + "reason": string; + /** + * status of the condition, one of True, False, Unknown. + */ + "status": "True" | "False" | "Unknown"; + /** + * type of condition in CamelCase or in foo.example.com/CamelCase. + */ + "type": string; + }>; + "endTime"?: string; + /** + * ObservedGeneration 是 Job 控制器最近一次完成调谐时所观测到的 + * metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + * phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + */ + "observedGeneration"?: number; + /** + * JobPhase 是 Job 的聚合生命周期阶段,由控制面 Job 控制器根据其 Task 的 + * 观测状态推导得出。取值集合必须与 Job 状态机保持一致。 + */ + "phase"?: "Pending" | "Running" | "Succeeded" | "Failed" | "Stopped"; + "startTime"?: string; + "tasks"?: Array<{ + "message"?: string; + "name"?: string; + /** + * TaskPhase 是单个 Task 的生命周期阶段,由数据面 Agent 观测本地工作负载后上报。 + * 取值集合与 JobPhase 对齐,Task 没有独立的 Stopping 中间态。 + */ + "phase"?: "Pending" | "Running" | "Succeeded" | "Failed" | "Stopped"; + }>; + }; +} + +export class Job extends Model implements IJob { + "apiVersion": IJob["apiVersion"]; + "kind": IJob["kind"]; + "metadata"?: IJob["metadata"]; + "spec"?: IJob["spec"]; + "status"?: IJob["status"]; + +static apiVersion: IJob["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: IJob["kind"] = "Job"; +static is = createTypeMetaGuard(Job); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Job.apiVersion, + kind: Job.kind, + ...data + } as IJob); +} +} + + +setValidateFunc(Job, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Node.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Node.ts new file mode 100644 index 0000000..931d67b --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Node.ts @@ -0,0 +1,190 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1Node.js"; + +export interface INode { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "Node"; + "metadata"?: IObjectMeta; + "spec"?: { + "agentType"?: "Kubernetes" | "Docker" | "Raw"; + "unschedulable"?: boolean; + }; + "status"?: { + /** + * Addresses 是节点地址列表(InternalIP / Hostname 等)。 + */ + "addresses"?: Array<{ + /** + * The node address. + */ + "address": string; + /** + * Node address type, one of Hostname, ExternalIP or InternalIP. + */ + "type": string; + }>; + /** + * ResourceList is a set of (resource name, quantity) pairs. + */ + "allocatable"?: { + [key: string]: number | string; + }; + /** + * ResourceList is a set of (resource name, quantity) pairs. + */ + "capacity"?: { + [key: string]: number | string; + }; + /** + * Conditions 记录节点的结构化状态结论,当前仅包含 ConditionTypeReady。 + * 它由观测(而非 Spec)驱动,因此不填写 ObservedGeneration。 + */ + "conditions"?: Array<{ + /** + * lastTransitionTime is the last time the condition transitioned from one status to another. + * This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + */ + "lastTransitionTime": string; + /** + * message is a human readable message indicating details about the transition. + * This may be an empty string. + */ + "message": string; + /** + * observedGeneration represents the .metadata.generation that the condition was set based upon. + * For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + * with respect to the current state of the instance. + */ + "observedGeneration"?: number; + /** + * reason contains a programmatic identifier indicating the reason for the condition's last transition. + * Producers of specific condition types may define expected values and meanings for this field, + * and whether the values are considered a guaranteed API. + * The value should be a CamelCase string. + * This field may not be empty. + */ + "reason": string; + /** + * status of the condition, one of True, False, Unknown. + */ + "status": "True" | "False" | "Unknown"; + /** + * type of condition in CamelCase or in foo.example.com/CamelCase. + */ + "type": string; + }>; + "diskPressure"?: boolean; + /** + * Events 由数据面 node-agent 上报节点相关 Kubernetes Event(如 DiskPressure + * 等 Warning 事件及镜像拉取/调度相关事件)。控制面 Task reconciler 在 Task + * 处于 Pending 期间聚合各节点事件到 Task.status.events,供前端展示。 + * 条目数量由 node-agent 侧裁剪(最多保留 50 条)。 + */ + "events"?: Array<{ + "count"?: number; + "lastTime"?: string; + "message"?: string; + "objectKind"?: string; + "objectName"?: string; + "reason": string; + "source"?: string; + "type": string; + }>; + /** + * LastHeartbeatTime 是控制面 Node Reconciler 从 Agent Lease 读取到的最近一次 + * 心跳续约时间;数据面不写入本字段。 + */ + "lastHeartbeatTime"?: string; + /** + * LastStatusChangeTime 是 Phase 最近一次发生变化的时间,与 LastHeartbeatTime + * 同由控制面 Node Reconciler 写入,用于区分「长时间保持同一状态」与「刚刚翻转」。 + */ + "lastStatusChangeTime"?: string; + /** + * NodeInfo 是节点基础信息,由数据面 Agent 上报;控制面不写入本字段。 + */ + "nodeInfo"?: { + "agentVersion"?: string; + "architecture"?: string; + "kernelVersion"?: string; + "operatingSystem"?: string; + }; + /** + * Phase 是节点连通性聚合阶段,由数据面 node-agent 上报。 + */ + "phase"?: "Online" | "Offline"; + /** + * PullProgress 是节点上正在进行的镜像拉取进度,由 node-agent 上报。 + */ + "pullProgress"?: Array<{ + "downloaded": number; + "image": string; + "message"?: string; + "speed": number; + "status": string; + "total": number; + }>; + /** + * Reason 是 Phase 的机器可读原因(CamelCase),与 Conditions 中 + * ConditionTypeReady 的 Reason 同源,供列表视图直接展示。 + * 该字段与 Conditions 均由数据面 node-agent 独占写入。 + */ + "reason"?: string; + /** + * NodeStorageStatus reports kubelet filesystem usage in bytes. + */ + "storage"?: { + "availableBytes"?: number; + "capacityBytes"?: number; + "usedBytes"?: number; + }; + /** + * ResourceList is a set of (resource name, quantity) pairs. + */ + "used"?: { + [key: string]: number | string; + }; + }; +} + +export class Node extends Model implements INode { + "apiVersion": INode["apiVersion"]; + "kind": INode["kind"]; + "metadata"?: INode["metadata"]; + "spec"?: INode["spec"]; + "status"?: INode["status"]; + +static apiVersion: INode["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: INode["kind"] = "Node"; +static is = createTypeMetaGuard(Node); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Node.apiVersion, + kind: Node.kind, + ...data + } as INode); +} +} + + +setValidateFunc(Node, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Pod.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Pod.ts new file mode 100644 index 0000000..a4faf32 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Pod.ts @@ -0,0 +1,70 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1Pod.js"; + +export interface IPod { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "Pod"; + "metadata"?: IObjectMeta; + /** + * PodSpec 包含 Pod 的标识和引用信息,由数据面上报时设置。 + */ + "spec"?: { + "domain"?: string; + "podName"?: string; + "podNamespace"?: string; + "taskName"?: string; + "taskNamespace"?: string; + }; + /** + * PodStatus 包含 Pod 的运行状态信息(节点、IP、阶段等), + * 对应 k8s 中由调度器和 kubelet 设置的观测状态。 + */ + "status"?: { + "ip"?: string; + "message"?: string; + "node"?: string; + "phase"?: "Pending" | "Running" | "Succeeded" | "Failed" | "Unknown"; + }; +} + +export class Pod extends Model implements IPod { + "apiVersion": IPod["apiVersion"]; + "kind": IPod["kind"]; + "metadata"?: IPod["metadata"]; + "spec"?: IPod["spec"]; + "status"?: IPod["status"]; + +static apiVersion: IPod["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: IPod["kind"] = "Pod"; +static is = createTypeMetaGuard(Pod); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Pod.apiVersion, + kind: Pod.kind, + ...data + } as IPod); +} +} + + +setValidateFunc(Pod, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Task.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Task.ts new file mode 100644 index 0000000..2b78a94 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Task.ts @@ -0,0 +1,7192 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1Task.js"; + +export interface ITask { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "Task"; + "metadata"?: IObjectMeta; + "spec"?: { + "downstreamName"?: string; + "environments"?: Array<{ + "parameters"?: any; + "type": string; + "version": string; + }>; + /** + * TaskPlacementSpec describes scheduling constraints for the workload. + */ + "placement": { + "nodeSelector"?: { + [key: string]: string; + }; + }; + /** + * TaskRole 描述 Task 在业务编排中的角色,用于前端分组与展示。 + * 该字段当前不在 CRD 层做枚举校验:它可能承载上层编排框架的自定义角色名, + * 收窄取值会阻止合法的既有数据写入。请勿据此推断取值的封闭集合。 + */ + "role": string; + /** + * TaskRuntimeSpec selects the runtime implementation and instance that lowers + * the common Pod template. Name is a stable runtime instance identifier; it is + * not a display name or proof of ownership. + */ + "runtime": { + /** + * RuntimeKind 表示负责执行 Task 工作负载的 Runtime 类型。 + * CRD 有意不限制该字符串的枚举值,使 Docker、Raw 等 Runtime 可以在不修改 + * Task Schema 的情况下扩展。Agent 必须在产生任何外部副作用前,通过已注册的 + * Provider 和能力校验拒绝未知或尚未支持的 Runtime 类型。 + */ + "kind": string; + "name"?: string; + }; + "suspended"?: boolean; + "tags"?: Array<{ + "key": string; + "values": Array; + }>; + /** + * TaskWorkloadSpec is the common workload declaration for every runtime. + * Kubernetes applies the Pod template natively. Future Docker and Raw providers + * lower the subset they support and reject unsupported fields before producing + * external effects. + */ + "workload": { + /** + * TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a + * workload. Type and Version identify a carrier contract; Parameters remain + * opaque until the selected Adapter or Runtime implementation strictly decodes + * them. Carrier identifiers are open strings, not CRD enums. + */ + "carrier": { + "parameters"?: any; + "type": string; + "version": string; + }; + /** + * WorkloadKind identifies the workload semantics independently of its Runtime + * carrier. The CRD deliberately keeps this identifier open; registered + * Adapters must reject unsupported kinds before producing external effects. + */ + "kind"?: string; + "parameters"?: any; + /** + * PodTemplateSpec describes the data a pod should have when created from a template + */ + "template"?: { + /** + * Standard object's metadata. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + "metadata"?: { + "annotations"?: { + [key: string]: string; + }; + "finalizers"?: Array; + "labels"?: { + [key: string]: string; + }; + "name"?: string; + "namespace"?: string; + }; + /** + * Specification of the desired behavior of the pod. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + "spec"?: { + /** + * Optional duration in seconds the pod may be active on the node relative to + * StartTime before the system will actively try to mark it failed and kill associated containers. + * Value must be a positive integer. + */ + "activeDeadlineSeconds"?: number; + /** + * If specified, the pod's scheduling constraints + */ + "affinity"?: { + /** + * Describes node affinity scheduling rules for the pod. + */ + "nodeAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and adding + * "weight" to the sum if the node matches the corresponding matchExpressions; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A node selector term, associated with the corresponding weight. + */ + "preference": { + /** + * A list of node selector requirements by node's labels. + */ + "matchExpressions"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + /** + * A list of node selector requirements by node's fields. + */ + "matchFields"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + }; + /** + * Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + */ + "weight": number; + }>; + /** + * If the affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to an update), the system + * may or may not try to eventually evict the pod from its node. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: { + /** + * Required. A list of node selector terms. The terms are ORed. + */ + "nodeSelectorTerms": Array<{ + /** + * A list of node selector requirements by node's labels. + */ + "matchExpressions"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + /** + * A list of node selector requirements by node's fields. + */ + "matchFields"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + }>; + }; + }; + /** + * Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + */ + "podAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and adding + * "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * Required. A pod affinity term, associated with the corresponding weight. + */ + "podAffinityTerm": { + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }; + /** + * weight associated with matching the corresponding podAffinityTerm, + * in the range 1-100. + */ + "weight": number; + }>; + /** + * If the affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to a pod label update), the + * system may or may not try to eventually evict the pod from its node. + * When there are multiple elements, the lists of nodes corresponding to each + * podAffinityTerm are intersected, i.e. all terms must be satisfied. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }>; + }; + /** + * Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + */ + "podAntiAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the anti-affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling anti-affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and subtracting + * "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * Required. A pod affinity term, associated with the corresponding weight. + */ + "podAffinityTerm": { + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }; + /** + * weight associated with matching the corresponding podAffinityTerm, + * in the range 1-100. + */ + "weight": number; + }>; + /** + * If the anti-affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the anti-affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to a pod label update), the + * system may or may not try to eventually evict the pod from its node. + * When there are multiple elements, the lists of nodes corresponding to each + * podAffinityTerm are intersected, i.e. all terms must be satisfied. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }>; + }; + }; + /** + * AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + */ + "automountServiceAccountToken"?: boolean; + /** + * List of containers belonging to the pod. + * Containers cannot currently be added or removed. + * There must be at least one container in a Pod. + * Cannot be updated. + */ + "containers": Array<{ + /** + * 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * 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 and StatefulSets. + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Actions that the management system should take in response to container lifecycle events. + * Cannot be updated. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the container specified as a DNS_LABEL. + * Each container in a pod must have a unique name (DNS_LABEL). + * Cannot be updated. + */ + "name": string; + /** + * 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. + * 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. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Periodic probe of container service readiness. + * Container will be removed from service endpoints if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + * This field cannot be set on ephemeral containers. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Compute Resources required by this container. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. + * This overrides the pod-level restart policy. When this field is not specified, + * the restart behavior is defined by the Pod's restart policy and the container type. + * Additionally, 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. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. The rules are evaluated in + * order. Once a rule matches a container exit condition, the remaining + * rules are ignored. If no rule matches the container exit condition, + * the Container-level restart policy determines the whether the container + * is restarted or not. Constraints on the rules: + * - At most 20 rules are allowed. + * - Rules can have the same action. + * - Identical rules are not forbidden in validations. + * When rules are specified, container MUST set RestartPolicy explicitly + * even it if matches the Pod's RestartPolicy. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * SecurityContext defines the security options the container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * StartupProbe indicates that the Pod has successfully initialized. + * If specified, no other probes are executed until this completes successfully. + * If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + * This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + * when it might take a long time to load data or warm a cache, than during steady-state operation. + * This cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * Specifies the DNS parameters of a pod. + * Parameters specified here will be merged to the generated DNS + * configuration based on DNSPolicy. + */ + "dnsConfig"?: { + /** + * A list of DNS name server IP addresses. + * This will be appended to the base nameservers generated from DNSPolicy. + * Duplicated nameservers will be removed. + */ + "nameservers"?: Array; + /** + * A list of DNS resolver options. + * This will be merged with the base options generated from DNSPolicy. + * Duplicated entries will be removed. Resolution options given in Options + * will override those that appear in the base DNSPolicy. + */ + "options"?: Array<{ + /** + * Name is this DNS resolver option's name. + * Required. + */ + "name"?: string; + /** + * Value is this DNS resolver option's value. + */ + "value"?: string; + }>; + /** + * A list of DNS search domains for host-name lookup. + * This will be appended to the base search paths generated from DNSPolicy. + * Duplicated search paths will be removed. + */ + "searches"?: Array; + }; + /** + * 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 'ClusterFirstWithHostNet'. + */ + "dnsPolicy"?: string; + /** + * EnableServiceLinks indicates whether information about services should be injected into pod's + * environment variables, matching the syntax of Docker links. + * Optional: Defaults to true. + */ + "enableServiceLinks"?: boolean; + /** + * List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + * pod to perform user-initiated actions such as debugging. This list cannot be specified when + * creating a pod, and it cannot be modified by updating the pod spec. In order to add an + * ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + */ + "ephemeralContainers"?: Array<{ + /** + * Arguments to the entrypoint. + * The 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * Entrypoint array. Not executed within a shell. + * The 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * Container image name. + * More info: https://kubernetes.io/docs/concepts/containers/images + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Lifecycle is not allowed for ephemeral containers. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Probes are not allowed for ephemeral containers. + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the ephemeral container specified as a DNS_LABEL. + * This name must be unique among all containers, init containers and ephemeral containers. + */ + "name": string; + /** + * Ports are not allowed for ephemeral containers. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Probes are not allowed for ephemeral containers. + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + * already allocated to the pod. + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * Restart policy for the container to manage the restart behavior of each + * container within a pod. + * You cannot set this field on ephemeral containers. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. You cannot set this field on + * ephemeral containers. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * Optional: SecurityContext defines the security options the ephemeral container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * Probes are not allowed for ephemeral containers. + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * If set, the name of the container from PodSpec that this ephemeral container targets. + * The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + * If not set then the ephemeral container uses the namespaces configured in the Pod spec. + * + * The container runtime must implement support for this feature. If the runtime does not + * support namespace targeting then the result of setting this field is undefined. + */ + "targetContainerName"?: string; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + * file if specified. + */ + "hostAliases"?: Array<{ + /** + * Hostnames for the above IP address. + */ + "hostnames"?: Array; + /** + * IP address of the host file entry. + */ + "ip": string; + }>; + /** + * Use the host's ipc namespace. + * Optional: Default to false. + */ + "hostIPC"?: boolean; + /** + * Host networking requested for this pod. Use the host's network namespace. + * When using HostNetwork you should specify ports so the scheduler is aware. + * When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, + * and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. + * Default to false. + */ + "hostNetwork"?: boolean; + /** + * Use the host's pid namespace. + * Optional: Default to false. + */ + "hostPID"?: boolean; + /** + * Use the host's user namespace. + * Optional: Default to true. + * If set to true or not present, the pod will be run in the host user namespace, useful + * for when the pod needs a feature only available to the host user namespace, such as + * loading a kernel module with CAP_SYS_MODULE. + * When set to false, a new userns is created for the pod. Setting false is useful for + * mitigating container breakout vulnerabilities even allowing users to run their + * containers as root without actually having root privileges on the host. + */ + "hostUsers"?: boolean; + /** + * Specifies the hostname of the Pod + * If not specified, the pod's hostname will be set to a system-defined value. + */ + "hostname"?: string; + /** + * HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. + * This field only specifies the pod's hostname and does not affect its DNS records. + * When this field is set to a non-empty string: + * - It takes precedence over the values set in `hostname` and `subdomain`. + * - The Pod's hostname will be set to this value. + * - `setHostnameAsFQDN` must be nil or set to false. + * - `hostNetwork` must be set to false. + * + * This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. + * Requires the HostnameOverride feature gate to be enabled. + */ + "hostnameOverride"?: string; + /** + * ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + * If specified, these secrets will be passed to individual puller implementations for them to use. + * More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + */ + "imagePullSecrets"?: Array<{ + /** + * 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 + */ + "name"?: string; + }>; + /** + * List of initialization containers belonging to the pod. + * Init containers are executed in order prior to containers being started. If any + * init container fails, the pod is considered to have failed and is handled according + * to its restartPolicy. The name for an init container or normal container must be + * unique among all containers. + * Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + * The resourceRequirements of an init container are taken into account during scheduling + * by finding the highest request/limit for each resource type, and then using the max of + * that value or the sum of the normal containers. Limits are applied to init containers + * in a similar fashion. + * Init containers cannot currently be added or removed. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + */ + "initContainers"?: Array<{ + /** + * 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * 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 and StatefulSets. + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Actions that the management system should take in response to container lifecycle events. + * Cannot be updated. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the container specified as a DNS_LABEL. + * Each container in a pod must have a unique name (DNS_LABEL). + * Cannot be updated. + */ + "name": string; + /** + * 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. + * 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. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Periodic probe of container service readiness. + * Container will be removed from service endpoints if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + * This field cannot be set on ephemeral containers. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Compute Resources required by this container. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. + * This overrides the pod-level restart policy. When this field is not specified, + * the restart behavior is defined by the Pod's restart policy and the container type. + * Additionally, 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. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. The rules are evaluated in + * order. Once a rule matches a container exit condition, the remaining + * rules are ignored. If no rule matches the container exit condition, + * the Container-level restart policy determines the whether the container + * is restarted or not. Constraints on the rules: + * - At most 20 rules are allowed. + * - Rules can have the same action. + * - Identical rules are not forbidden in validations. + * When rules are specified, container MUST set RestartPolicy explicitly + * even it if matches the Pod's RestartPolicy. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * SecurityContext defines the security options the container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * StartupProbe indicates that the Pod has successfully initialized. + * If specified, no other probes are executed until this completes successfully. + * If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + * This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + * when it might take a long time to load data or warm a cache, than during steady-state operation. + * This cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * NodeName indicates in which node this pod is scheduled. + * If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. + * Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. + * This field should not be used to express a desire for the pod to be scheduled on a specific node. + * https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + */ + "nodeName"?: string; + /** + * NodeSelector is a selector which must be true for the pod to fit on a node. + * Selector which must match a node's labels for the pod to be scheduled on that node. + * More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + */ + "nodeSelector"?: { + [key: string]: string; + }; + /** + * Specifies the OS of the containers in the pod. + * Some pod and container fields are restricted if this is set. + * + * If the OS field is set to linux, the following fields must be unset: + * -securityContext.windowsOptions + * + * If the OS field is set to windows, following fields must be unset: + * - spec.hostPID + * - spec.hostIPC + * - spec.hostUsers + * - spec.resources + * - spec.securityContext.appArmorProfile + * - spec.securityContext.seLinuxOptions + * - spec.securityContext.seccompProfile + * - spec.securityContext.fsGroup + * - spec.securityContext.fsGroupChangePolicy + * - spec.securityContext.sysctls + * - spec.shareProcessNamespace + * - spec.securityContext.runAsUser + * - spec.securityContext.runAsGroup + * - spec.securityContext.supplementalGroups + * - spec.securityContext.supplementalGroupsPolicy + * - spec.containers[\*].securityContext.appArmorProfile + * - spec.containers[\*].securityContext.seLinuxOptions + * - spec.containers[\*].securityContext.seccompProfile + * - spec.containers[\*].securityContext.capabilities + * - spec.containers[\*].securityContext.readOnlyRootFilesystem + * - spec.containers[\*].securityContext.privileged + * - spec.containers[\*].securityContext.allowPrivilegeEscalation + * - spec.containers[\*].securityContext.procMount + * - spec.containers[\*].securityContext.runAsUser + * - spec.containers[\*].securityContext.runAsGroup + */ + "os"?: { + /** + * Name is the name of the operating system. The currently supported values are linux and windows. + * Additional value may be defined in future and can be one of: + * https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + * Clients should expect to handle additional values and treat unrecognized values in this field as os: null + */ + "name": string; + }; + /** + * Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + * This field will be autopopulated at admission time by the RuntimeClass admission controller. If + * the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + * The RuntimeClass admission controller will reject Pod create requests which have the overhead already + * set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + * defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + * More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + */ + "overhead"?: { + [key: string]: number | string; + }; + /** + * PreemptionPolicy is the Policy for preempting pods with lower priority. + * One of Never, PreemptLowerPriority. + * Defaults to PreemptLowerPriority if unset. + */ + "preemptionPolicy"?: string; + /** + * The priority value. Various system components use this field to find the + * priority of the pod. When Priority Admission Controller is enabled, it + * prevents users from setting this field. The admission controller populates + * this field from PriorityClassName. + * The higher the value, the higher the priority. + */ + "priority"?: number; + /** + * If specified, indicates the pod's priority. "system-node-critical" and + * "system-cluster-critical" are two special keywords which indicate the + * highest priorities with the former being the highest priority. Any other + * name must be defined by creating a PriorityClass object with that name. + * If not specified, the pod priority will be default or zero if there is no + * default. + */ + "priorityClassName"?: string; + /** + * If specified, all readiness gates will be evaluated for pod readiness. + * A pod is ready when all its containers are ready AND + * all conditions specified in the readiness gates have status equal to "True" + * More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + */ + "readinessGates"?: Array<{ + /** + * ConditionType refers to a condition in the pod's condition list with matching type. + */ + "conditionType": string; + }>; + /** + * ResourceClaims defines which ResourceClaims must be allocated + * and reserved before the Pod is allowed to start. The resources + * will be made available to those containers which consume them + * by name. + * + * This is a stable field but requires that the + * DynamicResourceAllocation feature gate is enabled. + * + * This field is immutable. + */ + "resourceClaims"?: Array<{ + /** + * Name uniquely identifies this resource claim inside the pod. + * This must be a DNS_LABEL. + */ + "name": string; + /** + * ResourceClaimName is the name of a ResourceClaim object in the same + * namespace as this pod. + * + * Exactly one of ResourceClaimName and ResourceClaimTemplateName must + * be set. + */ + "resourceClaimName"?: string; + /** + * ResourceClaimTemplateName is the name of a ResourceClaimTemplate + * object in the same namespace as this pod. + * + * The template will be used to create a new ResourceClaim, which will + * be bound to this pod. When this pod is deleted, the ResourceClaim + * will also be deleted. The pod name and resource name, along with a + * generated component, will be used to form a unique name for the + * ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + * + * When the DRAWorkloadResourceClaims feature gate is enabled and the pod + * belongs to a PodGroup that defines a PodGroupResourceClaim with the same + * Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the + * ResourceClaim generated for the PodGroup. All pods in the group that + * define an equivalent PodResourceClaim matching the + * PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same + * generated ResourceClaim. ResourceClaims generated for a PodGroup are + * owned by the PodGroup and their lifecycles are tied to the PodGroup + * instead of any individual pod. + * + * This field is immutable and no changes will be made to the + * corresponding ResourceClaim by the control plane after creating the + * ResourceClaim. + * + * Exactly one of ResourceClaimName and ResourceClaimTemplateName must + * be set. + */ + "resourceClaimTemplateName"?: string; + }>; + /** + * Resources is the total amount of CPU and Memory resources required by all + * containers in the pod. It supports specifying Requests and Limits for + * "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. + * + * This field enables fine-grained control over resource allocation for the + * entire pod, allowing resource sharing among containers in a pod. + * + * This is an alpha field and requires enabling the PodLevelResources feature + * gate. + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * Restart policy for all containers within the pod. + * One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. + * Default to Always. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + */ + "restartPolicy"?: string; + /** + * RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + * to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + * If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + * empty definition that uses the default runtime handler. + * More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + */ + "runtimeClassName"?: string; + /** + * If specified, the pod will be dispatched by specified scheduler. + * If not specified, the pod will be dispatched by default scheduler. + */ + "schedulerName"?: string; + /** + * SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + * If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the + * scheduler will not attempt to schedule the pod. + * + * SchedulingGates can only be set at pod creation time, and be removed only afterwards. + */ + "schedulingGates"?: Array<{ + /** + * Name of the scheduling gate. + * Each scheduling gate must have a unique name field. + */ + "name": string; + }>; + /** + * SchedulingGroup provides a reference to the immediate scheduling runtime + * grouping object that this Pod belongs to. + * This field is used by the scheduler to identify the group and apply the + * correct group scheduling policies. The association with a group also + * impacts other lifecycle aspects of a Pod that are relevant in a wider context + * of scheduling like preemption, resource attachment, etc. If not specified, + * the Pod is treated as a single unit in all of these aspects. + * The group object referenced by this field may not exist at the time the + * Pod is created. + * This field is immutable, but a group object with the same name may be + * recreated with different policies. Doing this during pod scheduling + * may result in the placement not conforming to the expected policies. + */ + "schedulingGroup"?: { + /** + * PodGroupName specifies the name of the standalone PodGroup object + * that represents the runtime instance of this group. + * Must be a DNS subdomain. + */ + "podGroupName"?: string; + }; + /** + * SecurityContext holds pod-level security attributes and common container settings. + * Optional: Defaults to empty. See type description for default values of each field. + */ + "securityContext"?: { + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * A special supplemental group that applies to all containers in a pod. + * Some volume types allow the Kubelet to change the ownership of that volume + * to be owned by the pod: + * + * 1. The owning GID will be the FSGroup + * 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + * 3. The permission bits are OR'd with rw-rw---- + * + * If unset, the Kubelet will not modify the ownership and permissions of any volume. + * Note that this field cannot be set when spec.os.name is windows. + */ + "fsGroup"?: number; + /** + * fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + * before being exposed inside Pod. This field will only apply to + * volume types which support fsGroup based ownership(and permissions). + * It will have no effect on ephemeral volume types such as: secret, configmaps + * and emptydir. + * Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + * Note that this field cannot be set when spec.os.name is windows. + */ + "fsGroupChangePolicy"?: string; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence + * for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence + * for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + * It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + * Valid values are "MountOption" and "Recursive". + * + * "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + * This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + * + * "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + * This requires all Pods that share the same volume to use the same SELinux label. + * It is not possible to share the same volume among privileged and unprivileged Pods. + * Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + * whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + * CSIDriver instance. Other volumes are always re-labelled recursively. + * "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + * + * If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + * If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + * and "Recursive" for all other volumes. + * + * This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + * + * All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxChangePolicy"?: string; + /** + * The SELinux context to be applied to all containers. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in SecurityContext. If set in + * both SecurityContext and PodSecurityContext, the value specified in SecurityContext + * takes precedence for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by the containers in this pod. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * A list of groups applied to the first process run in each container, in + * addition to the container's primary GID and fsGroup (if specified). If + * the SupplementalGroupsPolicy feature is enabled, the + * supplementalGroupsPolicy field determines whether these are in addition + * to or instead of any group memberships defined in the container image. + * If unspecified, no additional groups are added, though group memberships + * defined in the container image may still be used, depending on the + * supplementalGroupsPolicy field. + * Note that this field cannot be set when spec.os.name is windows. + */ + "supplementalGroups"?: Array; + /** + * Defines how supplemental groups of the first container processes are calculated. + * Valid values are "Merge" and "Strict". If not specified, "Merge" is used. + * (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled + * and the container runtime must implement support for this feature. + * Note that this field cannot be set when spec.os.name is windows. + */ + "supplementalGroupsPolicy"?: string; + /** + * Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + * sysctls (by the container runtime) might fail to launch. + * Note that this field cannot be set when spec.os.name is windows. + */ + "sysctls"?: Array<{ + /** + * Name of a property to set + */ + "name": string; + /** + * Value of a property to set + */ + "value": string; + }>; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options within a container's SecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. + * Deprecated: Use serviceAccountName instead. + */ + "serviceAccount"?: string; + /** + * ServiceAccountName is the name of the ServiceAccount to use to run this pod. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + */ + "serviceAccountName"?: string; + /** + * If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + * In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + * In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + * If a pod does not have FQDN, this has no effect. + * Default to false. + */ + "setHostnameAsFQDN"?: boolean; + /** + * Share a single process namespace between all of the containers in a pod. + * When this is set containers will be able to view and signal processes from other containers + * in the same pod, and the first process in each container will not be assigned PID 1. + * HostPID and ShareProcessNamespace cannot both be set. + * Optional: Default to false. + */ + "shareProcessNamespace"?: boolean; + /** + * If specified, the fully qualified Pod hostname will be "...svc.". + * If not specified, the pod will not have a domainname at all. + */ + "subdomain"?: string; + /** + * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * If this value is nil, the default grace period will be used instead. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * Defaults to 30 seconds. + */ + "terminationGracePeriodSeconds"?: number; + /** + * If specified, the pod's tolerations. + */ + "tolerations"?: Array<{ + /** + * Effect indicates the taint effect to match. Empty means match all taint effects. + * When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + */ + "effect"?: string; + /** + * Key is the taint key that the toleration applies to. Empty means match all taint keys. + * If the key is empty, operator must be Exists; this combination means to match all values and all keys. + */ + "key"?: string; + /** + * Operator represents a key's relationship to the value. + * Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. + * Exists is equivalent to wildcard for value, so that a pod can + * tolerate all taints of a particular category. + * Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + */ + "operator"?: string; + /** + * TolerationSeconds represents the period of time the toleration (which must be + * of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + * it is not set, which means tolerate the taint forever (do not evict). Zero and + * negative values will be treated as 0 (evict immediately) by the system. + */ + "tolerationSeconds"?: number; + /** + * Value is the taint value the toleration matches to. + * If the operator is Exists, the value should be empty, otherwise just a regular string. + */ + "value"?: string; + }>; + /** + * TopologySpreadConstraints describes how a group of pods ought to spread across topology + * domains. Scheduler will schedule pods in a way which abides by the constraints. + * All topologySpreadConstraints are ANDed. + */ + "topologySpreadConstraints"?: Array<{ + /** + * LabelSelector is used to find matching pods. + * Pods that match this label selector are counted to determine the number of pods + * in their corresponding topology domain. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * MatchLabelKeys is a set of pod label keys to select the pods over which + * spreading will be calculated. The keys are used to lookup values from the + * incoming pod labels, those key-value labels are ANDed with labelSelector + * to select the group of existing pods over which spreading will be calculated + * for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. + * MatchLabelKeys cannot be set when LabelSelector isn't set. + * Keys that don't exist in the incoming pod labels will + * be ignored. A null or empty list means only match against labelSelector. + * + * This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + */ + "matchLabelKeys"?: Array; + /** + * MaxSkew describes the degree to which pods may be unevenly distributed. + * When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + * between the number of matching pods in the target topology and the global minimum. + * The global minimum is the minimum number of matching pods in an eligible domain + * or zero if the number of eligible domains is less than MinDomains. + * For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + * labelSelector spread as 2/2/1: + * In this case, the global minimum is 1. + * | zone1 | zone2 | zone3 | + * | P P | P P | P | + * - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; + * scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + * violate MaxSkew(1). + * - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + * When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + * to topologies that satisfy it. + * It's a required field. Default value is 1 and 0 is not allowed. + */ + "maxSkew": number; + /** + * MinDomains indicates a minimum number of eligible domains. + * When the number of eligible domains with matching topology keys is less than minDomains, + * Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. + * And when the number of eligible domains with matching topology keys equals or greater than minDomains, + * this value has no effect on scheduling. + * As a result, when the number of eligible domains is less than minDomains, + * scheduler won't schedule more than maxSkew Pods to those domains. + * If value is nil, the constraint behaves as if MinDomains is equal to 1. + * Valid values are integers greater than 0. + * When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + * + * For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same + * labelSelector spread as 2/2/2: + * | zone1 | zone2 | zone3 | + * | P P | P P | P P | + * The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. + * In this situation, new pod with the same labelSelector cannot be scheduled, + * because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, + * it will violate MaxSkew. + */ + "minDomains"?: number; + /** + * NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector + * when calculating pod topology spread skew. Options are: + * - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. + * - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + * + * If this value is nil, the behavior is equivalent to the Honor policy. + */ + "nodeAffinityPolicy"?: string; + /** + * NodeTaintsPolicy indicates how we will treat node taints when calculating + * pod topology spread skew. Options are: + * - Honor: nodes without taints, along with tainted nodes for which the incoming pod + * has a toleration, are included. + * - Ignore: node taints are ignored. All nodes are included. + * + * If this value is nil, the behavior is equivalent to the Ignore policy. + */ + "nodeTaintsPolicy"?: string; + /** + * TopologyKey is the key of node labels. Nodes that have a label with this key + * and identical values are considered to be in the same topology. + * We consider each as a "bucket", and try to put balanced number + * of pods into each bucket. + * We define a domain as a particular instance of a topology. + * Also, we define an eligible domain as a domain whose nodes meet the requirements of + * nodeAffinityPolicy and nodeTaintsPolicy. + * e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. + * And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. + * It's a required field. + */ + "topologyKey": string; + /** + * WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + * the spread constraint. + * - DoNotSchedule (default) tells the scheduler not to schedule it. + * - ScheduleAnyway tells the scheduler to schedule the pod in any location, + * but giving higher precedence to topologies that would help reduce the + * skew. + * A constraint is considered "Unsatisfiable" for an incoming pod + * if and only if every possible node assignment for that pod would violate + * "MaxSkew" on some topology. + * For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + * labelSelector spread as 3/1/1: + * | zone1 | zone2 | zone3 | + * | P P P | P | P | + * If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + * to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + * MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + * won't make it \*more\* imbalanced. + * It's a required field. + */ + "whenUnsatisfiable": string; + }>; + /** + * List of volumes that can be mounted by containers belonging to the pod. + * More info: https://kubernetes.io/docs/concepts/storage/volumes + */ + "volumes"?: Array<{ + /** + * awsElasticBlockStore represents an AWS Disk resource that is attached to a + * kubelet's host machine and then exposed to the pod. + * Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + * awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "awsElasticBlockStore"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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). + */ + "partition"?: number; + /** + * readOnly value true will force the readOnly setting in VolumeMounts. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "readOnly"?: boolean; + /** + * volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "volumeID": string; + }; + /** + * azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + * Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + * are redirected to the disk.csi.azure.com CSI driver. + */ + "azureDisk"?: { + /** + * cachingMode is the Host Caching mode: None, Read Only, Read Write. + */ + "cachingMode"?: string; + /** + * diskName is the Name of the data disk in the blob storage + */ + "diskName": string; + /** + * diskURI is the URI of data disk in the blob storage + */ + "diskURI": string; + /** + * 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. + */ + "fsType"?: string; + /** + * 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 + */ + "kind"?: string; + /** + * readOnly Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + }; + /** + * azureFile represents an Azure File Service mount on the host and bind mount to the pod. + * Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + * are redirected to the file.csi.azure.com CSI driver. + */ + "azureFile"?: { + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretName is the name of secret that contains Azure Storage Account Name and Key + */ + "secretName": string; + /** + * shareName is the azure share Name + */ + "shareName": string; + }; + /** + * cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + * Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. + */ + "cephfs"?: { + /** + * monitors is Required: Monitors is a collection of Ceph monitors + * More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + */ + "monitors": Array; + /** + * path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + */ + "path"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * 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 + */ + "secretFile"?: string; + /** + * 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 + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * 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 + */ + "user"?: string; + }; + /** + * cinder represents a cinder volume attached and mounted on kubelets host machine. + * Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + * are redirected to the cinder.csi.openstack.org CSI driver. + * More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "cinder"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * secretRef is optional: points to a secret object containing parameters used to connect + * to OpenStack. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * volumeID used to identify the volume in cinder. + * More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "volumeID": string; + }; + /** + * configMap represents a configMap that should populate this volume + */ + "configMap"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * 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 keys will not be + * present. If a key is specified which is not present in the ConfigMap, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; + }; + /** + * csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers. + */ + "csi"?: { + /** + * 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. + */ + "driver": string; + /** + * 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. + */ + "fsType"?: string; + /** + * 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 object contains more than one secret, all secret references are passed. + */ + "nodePublishSecretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * readOnly specifies a read-only configuration for the volume. + * Defaults to false (read/write). + */ + "readOnly"?: boolean; + /** + * volumeAttributes stores driver-specific properties that are passed to the CSI + * driver. Consult your driver's documentation for supported values. + */ + "volumeAttributes"?: { + [key: string]: string; + }; + }; + /** + * downwardAPI represents downward API about the pod that should populate this volume + */ + "downwardAPI"?: { + /** + * Optional: mode bits to use on created files by default. Must be a + * 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. + */ + "defaultMode"?: number; + /** + * Items is a list of downward API volume file + */ + "items"?: Array<{ + /** + * Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + */ + "path": string; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + }>; + }; + /** + * emptyDir represents a temporary directory that shares a pod's lifetime. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + */ + "emptyDir"?: { + /** + * 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 + */ + "medium"?: string; + /** + * 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 + */ + "sizeLimit"?: number | string; + }; + /** + * ephemeral represents a volume that is handled by a cluster storage driver. + * The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + * and deleted when the pod is removed. + * + * Use this if: + * a) the volume is only needed while the pod runs, + * b) features of normal volumes like restoring from snapshot or capacity + * tracking are needed, + * c) the storage driver is specified through a storage class, and + * d) the storage driver supports dynamic volume provisioning through + * a PersistentVolumeClaim (see EphemeralVolumeSource for more + * information on the connection between this volume type + * and PersistentVolumeClaim). + * + * Use PersistentVolumeClaim or one of the vendor-specific + * APIs for volumes that persist for longer than the lifecycle + * of an individual pod. + * + * Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + * be used that way - see the documentation of the driver for + * more information. + * + * A pod can use both types of ephemeral volumes and + * persistent volumes at the same time. + */ + "ephemeral"?: { + /** + * Will be used to create a stand-alone PVC to provision the volume. + * The pod in which this EphemeralVolumeSource is embedded will be the + * owner of the PVC, i.e. the PVC will be deleted together with the + * pod. The name of the PVC will be `-` where + * `` is the name from the `PodSpec.Volumes` array + * entry. Pod validation will reject the pod if the concatenated name + * is not valid for a PVC (for example, too long). + * + * An existing PVC with that name that is not owned by the pod + * will \*not\* be used for the pod to avoid using an unrelated + * volume by mistake. Starting the pod is then blocked until + * the unrelated PVC is removed. If such a pre-created PVC is + * meant to be used by the pod, the PVC has to updated with an + * owner reference to the pod once the pod exists. Normally + * this should not be necessary, but it may be useful when + * manually reconstructing a broken cluster. + * + * This field is read-only and no changes will be made by Kubernetes + * to the PVC after it has been created. + * + * Required, must not be nil. + */ + "volumeClaimTemplate"?: { + /** + * May contain labels and annotations that will be copied into the PVC + * when creating it. No other fields are allowed and will be rejected during + * validation. + */ + "metadata"?: { + "annotations"?: { + [key: string]: string; + }; + "finalizers"?: Array; + "labels"?: { + [key: string]: string; + }; + "name"?: string; + "namespace"?: string; + }; + /** + * The specification for the PersistentVolumeClaim. The entire content is + * copied unchanged into the PVC that gets created from this + * template. The same fields as in a PersistentVolumeClaim + * are also valid here. + */ + "spec": { + /** + * accessModes contains the desired access modes the volume should have. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + */ + "accessModes"?: Array; + /** + * 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. + */ + "dataSource"?: { + /** + * APIGroup is the group for the resource being referenced. + * If APIGroup is not specified, the specified Kind must be in the core API group. + * For any other third-party types, APIGroup is required. + */ + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; + }; + /** + * 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. + * 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 + * allows any non-core object, as well as PersistentVolumeClaim objects. + * \* While dataSource ignores disallowed values (dropping them), dataSourceRef + * preserves all values, and generates an error if a disallowed value is + * specified. + * \* While dataSource only allows local objects, dataSourceRef allows objects + * in any namespaces. + * (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. + */ + "dataSourceRef"?: { + /** + * APIGroup is the group for the resource being referenced. + * If APIGroup is not specified, the specified Kind must be in the core API group. + * For any other third-party types, APIGroup is required. + */ + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; + /** + * Namespace is the namespace of 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. + */ + "namespace"?: string; + }; + /** + * resources represents the minimum resources the volume should have. + * 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 the claim. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + */ + "resources"?: { + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * selector is a label query over volumes to consider for binding. + */ + "selector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * storageClassName is the name of the StorageClass required by the claim. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + */ + "storageClassName"?: string; + /** + * 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 or nil value indicates that no + * VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, + * this field can be reset to its previous value (including nil) to cancel the modification. + * 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/ + */ + "volumeAttributesClassName"?: string; + /** + * volumeMode defines what type of volume is required by the claim. + * Value of Filesystem is implied when not included in claim spec. + */ + "volumeMode"?: string; + /** + * volumeName is the binding reference to the PersistentVolume backing this claim. + */ + "volumeName"?: string; + }; + }; + }; + /** + * fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + */ + "fc"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * lun is Optional: FC target lun number + */ + "lun"?: number; + /** + * readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * targetWWNs is Optional: FC target worldwide names (WWNs) + */ + "targetWWNs"?: Array; + /** + * wwids Optional: FC volume world wide identifiers (wwids) + * Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + */ + "wwids"?: Array; + }; + /** + * flexVolume represents a generic volume resource that is + * provisioned/attached using an exec based plugin. + * Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + */ + "flexVolume"?: { + /** + * driver is the name of the driver to use for this volume. + */ + "driver": string; + /** + * 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. + */ + "fsType"?: string; + /** + * options is Optional: this field holds extra command options if any. + */ + "options"?: { + [key: string]: string; + }; + /** + * readOnly is Optional: defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * 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. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + }; + /** + * flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + * Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + */ + "flocker"?: { + /** + * datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + * should be considered as deprecated + */ + "datasetName"?: string; + /** + * datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + */ + "datasetUUID"?: string; + }; + /** + * gcePersistentDisk represents a GCE Disk resource that is attached to a + * kubelet's host machine and then exposed to the pod. + * Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + * gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + */ + "gcePersistentDisk"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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 + */ + "partition"?: number; + /** + * 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 + */ + "pdName": string; + /** + * readOnly here will force the ReadOnly setting in VolumeMounts. + * Defaults to false. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + */ + "readOnly"?: boolean; + }; + /** + * 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. + */ + "gitRepo"?: { + /** + * 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. + */ + "directory"?: string; + /** + * repository is the URL + */ + "repository": string; + /** + * revision is the commit hash for the specified revision. + */ + "revision"?: string; + }; + /** + * glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + * Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + */ + "glusterfs"?: { + /** + * endpoints is the endpoint name that details Glusterfs topology. + */ + "endpoints": string; + /** + * path is the Glusterfs volume path. + * More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + */ + "path": string; + /** + * 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 + */ + "readOnly"?: boolean; + }; + /** + * 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: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + */ + "hostPath"?: { + /** + * 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 + */ + "path": string; + /** + * type for HostPath Volume + * Defaults to "" + * More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + */ + "type"?: string; + }; + /** + * image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. + * The volume is resolved at pod startup depending on which PullPolicy value is provided: + * + * - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + * - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + * - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + * + * The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. + * A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. + * The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. + * The OCI object gets mounted in a single directory (spec.containers[\*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. + * The volume will be mounted read-only (ro). + * Sub path mounts for containers are not supported (spec.containers[\*].volumeMounts.subpath) before 1.33. + * The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. + */ + "image"?: { + /** + * Policy for pulling OCI objects. Possible values are: + * Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + * Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + * IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + * Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + */ + "pullPolicy"?: string; + /** + * Required: Image or artifact reference to be used. + * Behaves in the same way as pod.spec.containers[\*].image. + * Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. + * 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 and StatefulSets. + */ + "reference"?: string; + }; + /** + * iscsi represents an ISCSI 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/#iscsi + */ + "iscsi"?: { + /** + * chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + */ + "chapAuthDiscovery"?: boolean; + /** + * chapAuthSession defines whether support iSCSI Session CHAP authentication + */ + "chapAuthSession"?: boolean; + /** + * 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 + */ + "fsType"?: string; + /** + * initiatorName is the custom iSCSI Initiator Name. + * If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + * : will be created for the connection. + */ + "initiatorName"?: string; + /** + * iqn is the target iSCSI Qualified Name. + */ + "iqn": string; + /** + * iscsiInterface is the interface Name that uses an iSCSI transport. + * Defaults to 'default' (tcp). + */ + "iscsiInterface"?: string; + /** + * lun represents iSCSI Target Lun number. + */ + "lun": number; + /** + * 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). + */ + "portals"?: Array; + /** + * readOnly here will force the ReadOnly setting in VolumeMounts. + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * secretRef is the CHAP Secret for iSCSI target and initiator authentication + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * 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). + */ + "targetPortal": string; + }; + /** + * 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 + */ + "name": string; + /** + * nfs represents an NFS mount on the host that shares a pod's lifetime + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "nfs"?: { + /** + * path that is exported by the NFS server. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "path": string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * server is the hostname or IP address of the NFS server. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "server": string; + }; + /** + * persistentVolumeClaimVolumeSource represents a reference to a + * PersistentVolumeClaim in the same namespace. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + */ + "persistentVolumeClaim"?: { + /** + * 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 + */ + "claimName": string; + /** + * readOnly Will force the ReadOnly setting in VolumeMounts. + * Default false. + */ + "readOnly"?: boolean; + }; + /** + * photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + * Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. + */ + "photonPersistentDisk"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * pdID is the ID that identifies Photon Controller persistent disk + */ + "pdID": string; + }; + /** + * portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + * Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + * are redirected to the pxd.portworx.com CSI driver. + */ + "portworxVolume"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * volumeID uniquely identifies a Portworx volume + */ + "volumeID": string; + }; + /** + * projected items for all in one resources secrets, configmaps, and downward API + */ + "projected"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * sources is the list of volume projections. Each entry in this list + * handles one source. + */ + "sources"?: Array<{ + /** + * ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field + * of ClusterTrustBundle objects in an auto-updating file. + * + * Alpha, gated by the ClusterTrustBundleProjection feature gate. + * + * ClusterTrustBundle objects can either be selected by name, or by the + * combination of signer name and a label selector. + * + * Kubelet 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. + */ + "clusterTrustBundle"?: { + /** + * 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". + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * Select a single ClusterTrustBundle by object name. Mutually-exclusive + * with signerName and labelSelector. + */ + "name"?: string; + /** + * 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. + */ + "optional"?: boolean; + /** + * Relative path from the volume root to write the bundle. + */ + "path": string; + /** + * Select all ClusterTrustBundles that match this signer name. + * Mutually-exclusive with name. The contents of all selected + * ClusterTrustBundles will be unified and deduplicated. + */ + "signerName"?: string; + }; + /** + * configMap information about the configMap data to project + */ + "configMap"?: { + /** + * 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 keys will not be + * present. If a key is specified which is not present in the ConfigMap, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; + }; + /** + * downwardAPI information about the downwardAPI data to project + */ + "downwardAPI"?: { + /** + * Items is a list of DownwardAPIVolume file + */ + "items"?: Array<{ + /** + * Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + */ + "path": string; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + }>; + }; + /** + * Projects an auto-rotating credential bundle (private key and certificate + * chain) that the pod can use either as a TLS client or server. + * + * Kubelet generates a private key and uses it to send a + * PodCertificateRequest to the named signer. Once the signer approves the + * request and issues a certificate chain, Kubelet writes the key and + * certificate chain to the pod filesystem. The pod does not start until + * certificates have been issued for each podCertificate projected volume + * source in its spec. + * + * Kubelet will begin trying to rotate the certificate at the time indicated + * by the signer using the PodCertificateRequest.Status.BeginRefreshAt + * timestamp. + * + * Kubelet can write a single file, indicated by the credentialBundlePath + * field, or separate files, indicated by the keyPath and + * certificateChainPath fields. + * + * The credential bundle is a single file in PEM format. The first PEM + * entry is the private key (in PKCS#8 format), and the remaining PEM + * entries are the certificate chain issued by the signer (typically, + * signers will return their certificate chain in leaf-to-root order). + * + * Prefer using the credential bundle format, since your application code + * can read it atomically. If you use keyPath and certificateChainPath, + * your application must make two separate file reads. If these coincide + * with a certificate rotation, it is possible that the private key and leaf + * certificate you read may not correspond to each other. Your application + * will need to check for this condition, and re-read until they are + * consistent. + * + * The named signer controls chooses the format of the certificate it + * issues; consult the signer implementation's documentation to learn how to + * use the certificates it issues. + */ + "podCertificate"?: { + /** + * Write the certificate chain at this path in the projected volume. + * + * Most applications should use credentialBundlePath. When using keyPath + * and certificateChainPath, your application needs to check that the key + * and leaf certificate are consistent, because it is possible to read the + * files mid-rotation. + */ + "certificateChainPath"?: string; + /** + * Write the credential bundle at this path in the projected volume. + * + * The credential bundle is a single file that contains multiple PEM blocks. + * The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private + * key. + * + * The remaining blocks are CERTIFICATE blocks, containing the issued + * certificate chain from the signer (leaf and any intermediates). + * + * Using credentialBundlePath lets your Pod's application code make a single + * atomic read that retrieves a consistent key and certificate chain. If you + * project them to separate files, your application code will need to + * additionally check that the leaf certificate was issued to the key. + */ + "credentialBundlePath"?: string; + /** + * Write the key at this path in the projected volume. + * + * Most applications should use credentialBundlePath. When using keyPath + * and certificateChainPath, your application needs to check that the key + * and leaf certificate are consistent, because it is possible to read the + * files mid-rotation. + */ + "keyPath"?: string; + /** + * The type of keypair Kubelet will generate for the pod. + * + * Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", + * "ECDSAP521", and "ED25519". + */ + "keyType": string; + /** + * maxExpirationSeconds is the maximum lifetime permitted for the + * certificate. + * + * Kubelet copies this value verbatim into the PodCertificateRequests it + * generates for this projection. + * + * If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + * will reject values shorter than 3600 (1 hour). The maximum allowable + * value is 7862400 (91 days). + * + * The signer implementation is then free to issue a certificate with any + * lifetime \*shorter\* than MaxExpirationSeconds, but no shorter than 3600 + * seconds (1 hour). This constraint is enforced by kube-apiserver. + * `kubernetes.io` signers will never issue certificates with a lifetime + * longer than 24 hours. + */ + "maxExpirationSeconds"?: number; + /** + * Kubelet's generated CSRs will be addressed to this signer. + */ + "signerName": string; + /** + * userAnnotations allow pod authors to pass additional information to + * the signer implementation. Kubernetes does not restrict or validate this + * metadata in any way. + * + * These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of + * the PodCertificateRequest objects that Kubelet creates. + * + * Entries are subject to the same validation as object metadata annotations, + * with the addition that all keys must be domain-prefixed. No restrictions + * are placed on values, except an overall size limitation on the entire field. + * + * Signers should document the keys and values they support. Signers should + * deny requests that contain keys they do not recognize. + */ + "userAnnotations"?: { + [key: string]: string; + }; + }; + /** + * secret information about the secret data to project + */ + "secret"?: { + /** + * 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 will not be + * present. If a key is specified which is not present in the Secret, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional field specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + /** + * serviceAccountToken is information about the serviceAccountToken data to project + */ + "serviceAccountToken"?: { + /** + * 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. + */ + "audience"?: string; + /** + * 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 percent of + * its time to live or if the token is older than 24 hours.Defaults to 1 hour + * and must be at least 10 minutes. + */ + "expirationSeconds"?: number; + /** + * path is the path relative to the mount point of the file to project the + * token into. + */ + "path": string; + }; + }>; + }; + /** + * quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + * Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + */ + "quobyte"?: { + /** + * group to map volume access to + * Default is no group + */ + "group"?: string; + /** + * readOnly here will force the Quobyte volume to be mounted with read-only permissions. + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * 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 + */ + "registry": string; + /** + * tenant owning the given Quobyte volume in the Backend + * Used with dynamically provisioned Quobyte volumes, value is set by the plugin + */ + "tenant"?: string; + /** + * user to map volume access to + * Defaults to serivceaccount user + */ + "user"?: string; + /** + * volume is a string that references an already created Quobyte volume by name. + */ + "volume": string; + }; + /** + * rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + * Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + */ + "rbd"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * image is the rados image name. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "image": string; + /** + * 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 + */ + "keyring"?: string; + /** + * monitors is a collection of Ceph monitors. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "monitors": Array; + /** + * pool is the rados pool name. + * Default is rbd. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "pool"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * 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 + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * user is the rados user name. + * Default is admin. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "user"?: string; + }; + /** + * scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + * Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + */ + "scaleIO"?: { + /** + * 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". + */ + "fsType"?: string; + /** + * gateway is the host address of the ScaleIO API Gateway. + */ + "gateway": string; + /** + * protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + */ + "protectionDomain"?: string; + /** + * readOnly Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretRef references to the secret for ScaleIO user and other + * sensitive information. If this is not provided, Login operation will fail. + */ + "secretRef": { + /** + * 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 + */ + "name"?: string; + }; + /** + * sslEnabled Flag enable/disable SSL communication with Gateway, default false + */ + "sslEnabled"?: boolean; + /** + * storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + * Default is ThinProvisioned. + */ + "storageMode"?: string; + /** + * storagePool is the ScaleIO Storage Pool associated with the protection domain. + */ + "storagePool"?: string; + /** + * system is the name of the storage system as configured in ScaleIO. + */ + "system": string; + /** + * volumeName is the name of a volume already created in the ScaleIO system + * that is associated with this volume source. + */ + "volumeName"?: string; + }; + /** + * secret represents a secret that should populate this volume. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + */ + "secret"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * 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 will not be + * present. If a key is specified which is not present in the Secret, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * optional field specify whether the Secret or its keys must be defined + */ + "optional"?: boolean; + /** + * secretName is the name of the secret in the pod's namespace to use. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + */ + "secretName"?: string; + }; + /** + * storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + * Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + */ + "storageos"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretRef specifies the secret to use for obtaining the StorageOS API + * credentials. If not specified, default values will be attempted. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * volumeName is the human-readable name of the StorageOS volume. Volume + * names are only unique within a namespace. + */ + "volumeName"?: string; + /** + * 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 override the default behaviour. + * Set to "default" if you are not using namespaces within StorageOS. + * Namespaces that do not pre-exist within StorageOS will be created. + */ + "volumeNamespace"?: string; + }; + /** + * vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + * Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + * are redirected to the csi.vsphere.vmware.com CSI driver. + */ + "vsphereVolume"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + */ + "storagePolicyID"?: string; + /** + * storagePolicyName is the storage Policy Based Management (SPBM) profile name. + */ + "storagePolicyName"?: string; + /** + * volumePath is the path that identifies vSphere volume vmdk + */ + "volumePath": string; + }; + }>; + }; + }; + "version": string; + }; + }; + "status"?: { + "completionTime"?: string; + "conditions"?: Array<{ + /** + * lastTransitionTime is the last time the condition transitioned from one status to another. + * This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + */ + "lastTransitionTime": string; + /** + * message is a human readable message indicating details about the transition. + * This may be an empty string. + */ + "message": string; + /** + * observedGeneration represents the .metadata.generation that the condition was set based upon. + * For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + * with respect to the current state of the instance. + */ + "observedGeneration"?: number; + /** + * reason contains a programmatic identifier indicating the reason for the condition's last transition. + * Producers of specific condition types may define expected values and meanings for this field, + * and whether the values are considered a guaranteed API. + * The value should be a CamelCase string. + * This field may not be empty. + */ + "reason": string; + /** + * status of the condition, one of True, False, Unknown. + */ + "status": "True" | "False" | "Unknown"; + /** + * type of condition in CamelCase or in foo.example.com/CamelCase. + */ + "type": string; + }>; + /** + * Events 在 Task 处于 Pending 期间由控制面 Task reconciler 从各节点 + * Node.status.events 聚合而来,包含 DiskPressure 等 Warning 事件及镜像 + * 拉取/调度相关事件。Task 离开 Pending 后被清空。 + */ + "events"?: Array<{ + "count"?: number; + "lastTime"?: string; + "message"?: string; + "objectKind"?: string; + "objectName"?: string; + "reason": string; + "source"?: string; + "type": string; + }>; + "message"?: string; + /** + * ObservedGeneration 是数据面 Agent 最近一次完成本地工作负载调谐时所观测到的 + * metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + * phase / message / observedNodes 之前,应比较本字段与 metadata.generation + * 以识别过期状态。 + */ + "observedGeneration"?: number; + /** + * ObservedNodes 是当前承载该 Task 工作负载的节点名,由数据面 Agent 排序去重后上报。 + */ + "observedNodes"?: Array; + /** + * TaskPhase 是单个 Task 的生命周期阶段,由数据面 Agent 观测本地工作负载后上报。 + * 取值集合与 JobPhase 对齐,Task 没有独立的 Stopping 中间态。 + */ + "phase"?: "Pending" | "Running" | "Succeeded" | "Failed" | "Stopped"; + /** + * PullProgress 由数据面节点上的 image pull monitor 上报,仅在 Pod 处于 + * ContainerCreating(尚未 Running)期间由 cluster-agent 聚合写入。Pod 进入 + * Running 后被清空。供前端展示镜像拉取进度/速度。 + */ + "pullProgress"?: Array<{ + "downloaded": number; + "image": string; + "message"?: string; + "speed": number; + "status": string; + "total": number; + }>; + "retryCount"?: number; + "startTime"?: string; + "tensorBoardProxy"?: string; + }; +} + +export class Task extends Model implements ITask { + "apiVersion": ITask["apiVersion"]; + "kind": ITask["kind"]; + "metadata"?: ITask["metadata"]; + "spec"?: ITask["spec"]; + "status"?: ITask["status"]; + +static apiVersion: ITask["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: ITask["kind"] = "Task"; +static is = createTypeMetaGuard(Task); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Task.apiVersion, + kind: Task.kind, + ...data + } as ITask); +} +} + + +setValidateFunc(Task, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Workflow.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Workflow.ts new file mode 100644 index 0000000..cfc90ca --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/Workflow.ts @@ -0,0 +1,7186 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +import { IObjectMeta } from "@kubernetes-models/apimachinery/apis/meta/v1/ObjectMeta"; +import { Model, ModelData, setValidateFunc, createTypeMetaGuard } from "@kubernetes-models/base"; +import { ValidateFunc } from "@kubernetes-models/validate"; +import { validate } from "../../_schemas/RlinfIoV1alpha1Workflow.js"; + +export interface IWorkflow { + /** + * APIVersion defines the versioned schema of this representation of an object. + * Servers should convert recognized schemas to the latest internal value, and + * may reject unrecognized values. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + */ + "apiVersion": "rlinf.io/v1alpha1"; + /** + * Kind is a string value representing the REST resource this object represents. + * Servers may infer this from the endpoint the client submits requests to. + * Cannot be updated. + * In CamelCase. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + */ + "kind": "Workflow"; + "metadata"?: IObjectMeta; + "spec"?: { + "jobTemplates"?: Array<{ + /** + * Dependencies 是同一 Workflow 内其它 Job 模板的名字,依赖关系只存在于 + * Job 之间,不存在于 Job 内部的 Task 模板之间。 + */ + "dependencies"?: Array; + "name"?: string; + "spec"?: { + "domain"?: string; + "sshPublicKey"?: string; + /** + * Setting spec.suspended to true starts an orderly stop without deleting the Job resource. The Job becomes Stopped and is archived into the persistence backend after ArchiveTTL (default 5 minutes), while the Job CR is deleted from kcp. Starting the Job via POST /jobs/:name/start restores it from the persistence backend with the same name and spec but a new Kubernetes UID. + */ + "suspended"?: boolean; + "tags"?: Array<{ + "key": string; + "values": Array; + }>; + "tasks"?: Array<{ + "downstreamName"?: string; + "environments"?: Array<{ + "parameters"?: any; + "type": string; + "version": string; + }>; + "head"?: boolean; + "name"?: string; + /** + * TaskPlacementSpec describes scheduling constraints for the workload. + */ + "placement": { + "nodeSelector"?: { + [key: string]: string; + }; + }; + /** + * TaskRole 描述 Task 在业务编排中的角色,用于前端分组与展示。 + * 该字段当前不在 CRD 层做枚举校验:它可能承载上层编排框架的自定义角色名, + * 收窄取值会阻止合法的既有数据写入。请勿据此推断取值的封闭集合。 + */ + "role": string; + /** + * TaskRuntimeSpec selects the runtime implementation and instance that lowers + * the common Pod template. Name is a stable runtime instance identifier; it is + * not a display name or proof of ownership. + */ + "runtime": { + /** + * RuntimeKind 表示负责执行 Task 工作负载的 Runtime 类型。 + * CRD 有意不限制该字符串的枚举值,使 Docker、Raw 等 Runtime 可以在不修改 + * Task Schema 的情况下扩展。Agent 必须在产生任何外部副作用前,通过已注册的 + * Provider 和能力校验拒绝未知或尚未支持的 Runtime 类型。 + */ + "kind": string; + "name"?: string; + }; + "suspended"?: boolean; + "tags"?: Array<{ + "key": string; + "values": Array; + }>; + /** + * TaskWorkloadSpec is the common workload declaration for every runtime. + * Kubernetes applies the Pod template natively. Future Docker and Raw providers + * lower the subset they support and reject unsupported fields before producing + * external effects. + */ + "workload": { + /** + * TaskWorkloadCarrier selects the Runtime-specific carrier used to realize a + * workload. Type and Version identify a carrier contract; Parameters remain + * opaque until the selected Adapter or Runtime implementation strictly decodes + * them. Carrier identifiers are open strings, not CRD enums. + */ + "carrier": { + "parameters"?: any; + "type": string; + "version": string; + }; + /** + * WorkloadKind identifies the workload semantics independently of its Runtime + * carrier. The CRD deliberately keeps this identifier open; registered + * Adapters must reject unsupported kinds before producing external effects. + */ + "kind"?: string; + "parameters"?: any; + /** + * PodTemplateSpec describes the data a pod should have when created from a template + */ + "template"?: { + /** + * Standard object's metadata. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + */ + "metadata"?: { + "annotations"?: { + [key: string]: string; + }; + "finalizers"?: Array; + "labels"?: { + [key: string]: string; + }; + "name"?: string; + "namespace"?: string; + }; + /** + * Specification of the desired behavior of the pod. + * More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + */ + "spec"?: { + /** + * Optional duration in seconds the pod may be active on the node relative to + * StartTime before the system will actively try to mark it failed and kill associated containers. + * Value must be a positive integer. + */ + "activeDeadlineSeconds"?: number; + /** + * If specified, the pod's scheduling constraints + */ + "affinity"?: { + /** + * Describes node affinity scheduling rules for the pod. + */ + "nodeAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and adding + * "weight" to the sum if the node matches the corresponding matchExpressions; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A node selector term, associated with the corresponding weight. + */ + "preference": { + /** + * A list of node selector requirements by node's labels. + */ + "matchExpressions"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + /** + * A list of node selector requirements by node's fields. + */ + "matchFields"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + }; + /** + * Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. + */ + "weight": number; + }>; + /** + * If the affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to an update), the system + * may or may not try to eventually evict the pod from its node. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: { + /** + * Required. A list of node selector terms. The terms are ORed. + */ + "nodeSelectorTerms": Array<{ + /** + * A list of node selector requirements by node's labels. + */ + "matchExpressions"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + /** + * A list of node selector requirements by node's fields. + */ + "matchFields"?: Array<{ + /** + * The label key that the selector applies to. + */ + "key": string; + /** + * Represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. + */ + "operator": string; + /** + * An array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. If the operator is Gt or Lt, the values + * array must have a single element, which will be interpreted as an integer. + * This array is replaced during a strategic merge patch. + */ + "values"?: Array; + }>; + }>; + }; + }; + /** + * Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)). + */ + "podAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and adding + * "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * Required. A pod affinity term, associated with the corresponding weight. + */ + "podAffinityTerm": { + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }; + /** + * weight associated with matching the corresponding podAffinityTerm, + * in the range 1-100. + */ + "weight": number; + }>; + /** + * If the affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to a pod label update), the + * system may or may not try to eventually evict the pod from its node. + * When there are multiple elements, the lists of nodes corresponding to each + * podAffinityTerm are intersected, i.e. all terms must be satisfied. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }>; + }; + /** + * Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)). + */ + "podAntiAffinity"?: { + /** + * The scheduler will prefer to schedule pods to nodes that satisfy + * the anti-affinity expressions specified by this field, but it may choose + * a node that violates one or more of the expressions. The node that is + * most preferred is the one with the greatest sum of weights, i.e. + * for each node that meets all of the scheduling requirements (resource + * request, requiredDuringScheduling anti-affinity expressions, etc.), + * compute a sum by iterating through the elements of this field and subtracting + * "weight" from the sum if the node has pods which matches the corresponding podAffinityTerm; the + * node(s) with the highest sum are the most preferred. + */ + "preferredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * Required. A pod affinity term, associated with the corresponding weight. + */ + "podAffinityTerm": { + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }; + /** + * weight associated with matching the corresponding podAffinityTerm, + * in the range 1-100. + */ + "weight": number; + }>; + /** + * If the anti-affinity requirements specified by this field are not met at + * scheduling time, the pod will not be scheduled onto the node. + * If the anti-affinity requirements specified by this field cease to be met + * at some point during pod execution (e.g. due to a pod label update), the + * system may or may not try to eventually evict the pod from its node. + * When there are multiple elements, the lists of nodes corresponding to each + * podAffinityTerm are intersected, i.e. all terms must be satisfied. + */ + "requiredDuringSchedulingIgnoredDuringExecution"?: Array<{ + /** + * A label query over a set of resources, in this case pods. + * If it's null, this PodAffinityTerm matches with no Pods. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * 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. + */ + "matchLabelKeys"?: Array; + /** + * 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. + */ + "mismatchLabelKeys"?: Array; + /** + * A label query over the set of namespaces that the term applies to. + * The term is applied to the union of the namespaces selected by this field + * and the ones listed in the namespaces field. + * null selector and null or empty namespaces list means "this pod's namespace". + * An empty selector ({}) matches all namespaces. + */ + "namespaceSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * namespaces specifies a static list of namespace names that the term applies to. + * The term is applied to the union of the namespaces listed in this field + * and the ones selected by namespaceSelector. + * null or empty namespaces list and null namespaceSelector means "this pod's namespace". + */ + "namespaces"?: Array; + /** + * This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching + * the labelSelector in the specified namespaces, where co-located is defined as running on a node + * whose value of the label with key topologyKey matches that of any node on which any of the + * selected pods is running. + * Empty topologyKey is not allowed. + */ + "topologyKey": string; + }>; + }; + }; + /** + * AutomountServiceAccountToken indicates whether a service account token should be automatically mounted. + */ + "automountServiceAccountToken"?: boolean; + /** + * List of containers belonging to the pod. + * Containers cannot currently be added or removed. + * There must be at least one container in a Pod. + * Cannot be updated. + */ + "containers": Array<{ + /** + * 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * 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 and StatefulSets. + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Actions that the management system should take in response to container lifecycle events. + * Cannot be updated. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the container specified as a DNS_LABEL. + * Each container in a pod must have a unique name (DNS_LABEL). + * Cannot be updated. + */ + "name": string; + /** + * 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. + * 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. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Periodic probe of container service readiness. + * Container will be removed from service endpoints if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + * This field cannot be set on ephemeral containers. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Compute Resources required by this container. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. + * This overrides the pod-level restart policy. When this field is not specified, + * the restart behavior is defined by the Pod's restart policy and the container type. + * Additionally, 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. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. The rules are evaluated in + * order. Once a rule matches a container exit condition, the remaining + * rules are ignored. If no rule matches the container exit condition, + * the Container-level restart policy determines the whether the container + * is restarted or not. Constraints on the rules: + * - At most 20 rules are allowed. + * - Rules can have the same action. + * - Identical rules are not forbidden in validations. + * When rules are specified, container MUST set RestartPolicy explicitly + * even it if matches the Pod's RestartPolicy. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * SecurityContext defines the security options the container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * StartupProbe indicates that the Pod has successfully initialized. + * If specified, no other probes are executed until this completes successfully. + * If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + * This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + * when it might take a long time to load data or warm a cache, than during steady-state operation. + * This cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * Specifies the DNS parameters of a pod. + * Parameters specified here will be merged to the generated DNS + * configuration based on DNSPolicy. + */ + "dnsConfig"?: { + /** + * A list of DNS name server IP addresses. + * This will be appended to the base nameservers generated from DNSPolicy. + * Duplicated nameservers will be removed. + */ + "nameservers"?: Array; + /** + * A list of DNS resolver options. + * This will be merged with the base options generated from DNSPolicy. + * Duplicated entries will be removed. Resolution options given in Options + * will override those that appear in the base DNSPolicy. + */ + "options"?: Array<{ + /** + * Name is this DNS resolver option's name. + * Required. + */ + "name"?: string; + /** + * Value is this DNS resolver option's value. + */ + "value"?: string; + }>; + /** + * A list of DNS search domains for host-name lookup. + * This will be appended to the base search paths generated from DNSPolicy. + * Duplicated search paths will be removed. + */ + "searches"?: Array; + }; + /** + * 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 'ClusterFirstWithHostNet'. + */ + "dnsPolicy"?: string; + /** + * EnableServiceLinks indicates whether information about services should be injected into pod's + * environment variables, matching the syntax of Docker links. + * Optional: Defaults to true. + */ + "enableServiceLinks"?: boolean; + /** + * List of ephemeral containers run in this pod. Ephemeral containers may be run in an existing + * pod to perform user-initiated actions such as debugging. This list cannot be specified when + * creating a pod, and it cannot be modified by updating the pod spec. In order to add an + * ephemeral container to an existing pod, use the pod's ephemeralcontainers subresource. + */ + "ephemeralContainers"?: Array<{ + /** + * Arguments to the entrypoint. + * The 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * Entrypoint array. Not executed within a shell. + * The 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * Container image name. + * More info: https://kubernetes.io/docs/concepts/containers/images + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Lifecycle is not allowed for ephemeral containers. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Probes are not allowed for ephemeral containers. + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the ephemeral container specified as a DNS_LABEL. + * This name must be unique among all containers, init containers and ephemeral containers. + */ + "name": string; + /** + * Ports are not allowed for ephemeral containers. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Probes are not allowed for ephemeral containers. + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Resources are not allowed for ephemeral containers. Ephemeral containers use spare resources + * already allocated to the pod. + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * Restart policy for the container to manage the restart behavior of each + * container within a pod. + * You cannot set this field on ephemeral containers. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. You cannot set this field on + * ephemeral containers. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * Optional: SecurityContext defines the security options the ephemeral container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * Probes are not allowed for ephemeral containers. + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * If set, the name of the container from PodSpec that this ephemeral container targets. + * The ephemeral container will be run in the namespaces (IPC, PID, etc) of this container. + * If not set then the ephemeral container uses the namespaces configured in the Pod spec. + * + * The container runtime must implement support for this feature. If the runtime does not + * support namespace targeting then the result of setting this field is undefined. + */ + "targetContainerName"?: string; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. Subpath mounts are not allowed for ephemeral containers. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * HostAliases is an optional list of hosts and IPs that will be injected into the pod's hosts + * file if specified. + */ + "hostAliases"?: Array<{ + /** + * Hostnames for the above IP address. + */ + "hostnames"?: Array; + /** + * IP address of the host file entry. + */ + "ip": string; + }>; + /** + * Use the host's ipc namespace. + * Optional: Default to false. + */ + "hostIPC"?: boolean; + /** + * Host networking requested for this pod. Use the host's network namespace. + * When using HostNetwork you should specify ports so the scheduler is aware. + * When `hostNetwork` is true, specified `hostPort` fields in port definitions must match `containerPort`, + * and unspecified `hostPort` fields in port definitions are defaulted to match `containerPort`. + * Default to false. + */ + "hostNetwork"?: boolean; + /** + * Use the host's pid namespace. + * Optional: Default to false. + */ + "hostPID"?: boolean; + /** + * Use the host's user namespace. + * Optional: Default to true. + * If set to true or not present, the pod will be run in the host user namespace, useful + * for when the pod needs a feature only available to the host user namespace, such as + * loading a kernel module with CAP_SYS_MODULE. + * When set to false, a new userns is created for the pod. Setting false is useful for + * mitigating container breakout vulnerabilities even allowing users to run their + * containers as root without actually having root privileges on the host. + */ + "hostUsers"?: boolean; + /** + * Specifies the hostname of the Pod + * If not specified, the pod's hostname will be set to a system-defined value. + */ + "hostname"?: string; + /** + * HostnameOverride specifies an explicit override for the pod's hostname as perceived by the pod. + * This field only specifies the pod's hostname and does not affect its DNS records. + * When this field is set to a non-empty string: + * - It takes precedence over the values set in `hostname` and `subdomain`. + * - The Pod's hostname will be set to this value. + * - `setHostnameAsFQDN` must be nil or set to false. + * - `hostNetwork` must be set to false. + * + * This field must be a valid DNS subdomain as defined in RFC 1123 and contain at most 64 characters. + * Requires the HostnameOverride feature gate to be enabled. + */ + "hostnameOverride"?: string; + /** + * ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + * If specified, these secrets will be passed to individual puller implementations for them to use. + * More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + */ + "imagePullSecrets"?: Array<{ + /** + * 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 + */ + "name"?: string; + }>; + /** + * List of initialization containers belonging to the pod. + * Init containers are executed in order prior to containers being started. If any + * init container fails, the pod is considered to have failed and is handled according + * to its restartPolicy. The name for an init container or normal container must be + * unique among all containers. + * Init containers may not have Lifecycle actions, Readiness probes, Liveness probes, or Startup probes. + * The resourceRequirements of an init container are taken into account during scheduling + * by finding the highest request/limit for each resource type, and then using the max of + * that value or the sum of the normal containers. Limits are applied to init containers + * in a similar fashion. + * Init containers cannot currently be added or removed. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ + */ + "initContainers"?: Array<{ + /** + * 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "args"?: Array; + /** + * 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 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 + * of whether the variable exists or not. Cannot be updated. + * More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell + */ + "command"?: Array; + /** + * List of environment variables to set in the container. + * Cannot be updated. + */ + "env"?: Array<{ + /** + * Name of the environment variable. + * May consist of any printable ASCII characters except '='. + */ + "name": string; + /** + * Variable references $(VAR_NAME) are expanded + * using the previously defined environment variables in the container and + * any service environment variables. 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 of whether the variable + * exists or not. + * Defaults to "". + */ + "value"?: string; + /** + * Source for the environment variable's value. Cannot be used if value is not empty. + */ + "valueFrom"?: { + /** + * Selects a key of a ConfigMap. + */ + "configMapKeyRef"?: { + /** + * The key to select. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap or its key must be defined + */ + "optional"?: boolean; + }; + /** + * Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, + * spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * FileKeyRef selects a key of the env file. + * Requires the EnvFiles feature gate to be enabled. + */ + "fileKeyRef"?: { + /** + * The key within the env file. An invalid key will prevent the pod from starting. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + */ + "key": string; + /** + * Specify whether the file or its key must be defined. If the file or key + * does not exist, then the env var is not published. + * If optional is set to true and the specified key does not exist, + * the environment variable will not be set in the Pod's containers. + * + * If optional is set to false and the specified key does not exist, + * an error will be returned during Pod creation. + */ + "optional"?: boolean; + /** + * The path within the volume from which to select the file. + * Must be relative and may not contain the '..' path or start with '..'. + */ + "path": string; + /** + * The name of the volume mount containing the env file. + */ + "volumeName": string; + }; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + /** + * Selects a key of a secret in the pod's namespace + */ + "secretKeyRef"?: { + /** + * The key of the secret to select from. Must be a valid secret key. + */ + "key": string; + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + }; + }>; + /** + * List of sources to populate environment variables in the container. + * The keys defined within a source may consist of any printable ASCII characters except '='. + * When a key exists in multiple + * sources, the value associated with the last source will take precedence. + * Values defined by an Env with a duplicate key will take precedence. + * Cannot be updated. + */ + "envFrom"?: Array<{ + /** + * The ConfigMap to select from + */ + "configMapRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the ConfigMap must be defined + */ + "optional"?: boolean; + }; + /** + * Optional text to prepend to the name of each environment variable. + * May consist of any printable ASCII characters except '='. + */ + "prefix"?: string; + /** + * The Secret to select from + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + /** + * Specify whether the Secret must be defined + */ + "optional"?: boolean; + }; + }>; + /** + * 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 and StatefulSets. + */ + "image"?: string; + /** + * 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 + */ + "imagePullPolicy"?: string; + /** + * Actions that the management system should take in response to container lifecycle events. + * Cannot be updated. + */ + "lifecycle"?: { + /** + * PostStart is called immediately after a container is created. If the handler fails, + * the container is terminated and restarted according to its restart policy. + * Other management of the container blocks until the hook completes. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "postStart"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * PreStop is called immediately before a container is terminated due to an + * API request or management event such as liveness/startup probe failure, + * preemption, resource contention, etc. The handler is not called if the + * container crashes or exits. The Pod's termination grace period countdown begins before the + * PreStop hook is executed. Regardless of the outcome of the handler, the + * container will eventually terminate within the Pod's termination grace + * period (unless delayed by finalizers). Other management of the container blocks until the hook completes + * or until the termination grace period is reached. + * More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks + */ + "preStop"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Sleep represents a duration that the container should sleep. + */ + "sleep"?: { + /** + * Seconds is the number of seconds to sleep. + */ + "seconds": number; + }; + /** + * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept + * for backward compatibility. There is no validation of this field and + * lifecycle hooks will fail at runtime when it is specified. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + }; + /** + * StopSignal defines which signal will be sent to a container when it is being stopped. + * If not specified, the default is defined by the container runtime in use. + * StopSignal can only be set for Pods with a non-empty .spec.os.name + */ + "stopSignal"?: string; + }; + /** + * Periodic probe of container liveness. + * Container will be restarted if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "livenessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Name of the container specified as a DNS_LABEL. + * Each container in a pod must have a unique name (DNS_LABEL). + * Cannot be updated. + */ + "name": string; + /** + * 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. + * 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. + */ + "ports"?: Array<{ + /** + * Number of port to expose on the pod's IP address. + * This must be a valid port number, 0 < x < 65536. + */ + "containerPort": number; + /** + * What host IP to bind the external port to. + */ + "hostIP"?: string; + /** + * Number of port to expose on the host. + * If specified, this must be a valid port number, 0 < x < 65536. + * If HostNetwork is specified, this must match ContainerPort. + * Most containers do not need this. + */ + "hostPort"?: number; + /** + * If specified, this must be an IANA_SVC_NAME and unique within the pod. Each + * named port in a pod must have a unique name. Name for the port that can be + * referred to by services. + */ + "name"?: string; + /** + * Protocol for port. Must be UDP, TCP, or SCTP. + * Defaults to "TCP". + */ + "protocol"?: string; + }>; + /** + * Periodic probe of container service readiness. + * Container will be removed from service endpoints if the probe fails. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "readinessProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Resources resize policy for the container. + * This field cannot be set on ephemeral containers. + */ + "resizePolicy"?: Array<{ + /** + * Name of the resource to which this resource resize policy applies. + * Supported values: cpu, memory. + */ + "resourceName": string; + /** + * Restart policy to apply when specified resource is resized. + * If not specified, it defaults to NotRequired. + */ + "restartPolicy": string; + }>; + /** + * Compute Resources required by this container. + * Cannot be updated. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. + * This overrides the pod-level restart policy. When this field is not specified, + * the restart behavior is defined by the Pod's restart policy and the container type. + * Additionally, 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. + */ + "restartPolicy"?: string; + /** + * Represents a list of rules to be checked to determine if the + * container should be restarted on exit. The rules are evaluated in + * order. Once a rule matches a container exit condition, the remaining + * rules are ignored. If no rule matches the container exit condition, + * the Container-level restart policy determines the whether the container + * is restarted or not. Constraints on the rules: + * - At most 20 rules are allowed. + * - Rules can have the same action. + * - Identical rules are not forbidden in validations. + * When rules are specified, container MUST set RestartPolicy explicitly + * even it if matches the Pod's RestartPolicy. + */ + "restartPolicyRules"?: Array<{ + /** + * Specifies the action taken on a container exit if the requirements + * are satisfied. The only possible value is "Restart" to restart the + * container. + */ + "action": string; + /** + * Represents the exit codes to check on container exits. + */ + "exitCodes"?: { + /** + * Represents the relationship between the container exit code(s) and the + * specified values. Possible values are: + * - In: the requirement is satisfied if the container exit code is in the + * set of specified values. + * - NotIn: the requirement is satisfied if the container exit code is + * not in the set of specified values. + */ + "operator": string; + /** + * Specifies the set of values to check for container exit codes. + * At most 255 elements are allowed. + */ + "values"?: Array; + }; + }>; + /** + * SecurityContext defines the security options the container should be run with. + * If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ + */ + "securityContext"?: { + /** + * AllowPrivilegeEscalation controls whether a process can gain more + * privileges than its parent process. This bool directly controls if + * the no_new_privs flag will be set on the container process. + * AllowPrivilegeEscalation is true always when the container is: + * 1) run as Privileged + * 2) has CAP_SYS_ADMIN + * Note that this field cannot be set when spec.os.name is windows. + */ + "allowPrivilegeEscalation"?: boolean; + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * The capabilities to add/drop when running containers. + * Defaults to the default set of capabilities granted by the container runtime. + * Note that this field cannot be set when spec.os.name is windows. + */ + "capabilities"?: { + /** + * Added capabilities + */ + "add"?: Array; + /** + * Removed capabilities + */ + "drop"?: Array; + }; + /** + * Run container in privileged mode. + * Processes in privileged containers are essentially equivalent to root on the host. + * Defaults to false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "privileged"?: boolean; + /** + * procMount denotes the type of proc mount to use for the containers. + * The default value is Default which uses the container runtime defaults for + * readonly paths and masked paths. + * Note that this field cannot be set when spec.os.name is windows. + */ + "procMount"?: string; + /** + * Whether this container has a read-only root filesystem. + * Default is false. + * Note that this field cannot be set when spec.os.name is windows. + */ + "readOnlyRootFilesystem"?: boolean; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * The SELinux context to be applied to the container. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by this container. If seccomp options are + * provided at both the pod & container level, the container options + * override the pod options. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options from the PodSecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * StartupProbe indicates that the Pod has successfully initialized. + * If specified, no other probes are executed until this completes successfully. + * If this probe fails, the Pod will be restarted, just as if the livenessProbe failed. + * This can be used to provide different probe parameters at the beginning of a Pod's lifecycle, + * when it might take a long time to load data or warm a cache, than during steady-state operation. + * This cannot be updated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "startupProbe"?: { + /** + * Exec specifies a command to execute in the container. + */ + "exec"?: { + /** + * Command is the command line to execute inside the container, the working directory for the + * command is root ('/') in the container's filesystem. The command is simply exec'd, it is + * not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use + * a shell, you need to explicitly call out to that shell. + * Exit status of 0 is treated as live/healthy and non-zero is unhealthy. + */ + "command"?: Array; + }; + /** + * Minimum consecutive failures for the probe to be considered failed after having succeeded. + * Defaults to 3. Minimum value is 1. + */ + "failureThreshold"?: number; + /** + * GRPC specifies a GRPC HealthCheckRequest. + */ + "grpc"?: { + /** + * Port number of the gRPC service. Number must be in the range 1 to 65535. + */ + "port": number; + /** + * Service is the name of the service to place in the gRPC HealthCheckRequest + * (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + * + * If this is not specified, the default behavior is defined by gRPC. + */ + "service"?: string; + }; + /** + * HTTPGet specifies an HTTP GET request to perform. + */ + "httpGet"?: { + /** + * Host name to connect to, defaults to the pod IP. You probably want to set + * "Host" in httpHeaders instead. + */ + "host"?: string; + /** + * Custom headers to set in the request. HTTP allows repeated headers. + */ + "httpHeaders"?: Array<{ + /** + * The header field name. + * This will be canonicalized upon output, so case-variant names will be understood as the same header. + */ + "name": string; + /** + * The header field value + */ + "value": string; + }>; + /** + * Path to access on the HTTP server. + */ + "path"?: string; + /** + * Name or number of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + /** + * Scheme to use for connecting to the host. + * Defaults to HTTP. + */ + "scheme"?: string; + }; + /** + * Number of seconds after the container has started before liveness probes are initiated. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "initialDelaySeconds"?: number; + /** + * How often (in seconds) to perform the probe. + * Default to 10 seconds. Minimum value is 1. + */ + "periodSeconds"?: number; + /** + * Minimum consecutive successes for the probe to be considered successful after having failed. + * Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. + */ + "successThreshold"?: number; + /** + * TCPSocket specifies a connection to a TCP port. + */ + "tcpSocket"?: { + /** + * Optional: Host name to connect to, defaults to the pod IP. + */ + "host"?: string; + /** + * Number or name of the port to access on the container. + * Number must be in the range 1 to 65535. + * Name must be an IANA_SVC_NAME. + */ + "port": number | string; + }; + /** + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this + * value overrides the value provided by the pod spec. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * This is a beta field and requires enabling ProbeTerminationGracePeriod feature gate. + * Minimum value is 1. spec.terminationGracePeriodSeconds is used if unset. + */ + "terminationGracePeriodSeconds"?: number; + /** + * Number of seconds after which the probe times out. + * Defaults to 1 second. Minimum value is 1. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes + */ + "timeoutSeconds"?: number; + }; + /** + * Whether this container should allocate a buffer for stdin in the container runtime. If this + * is not set, reads from stdin in the container will always result in EOF. + * Default is false. + */ + "stdin"?: boolean; + /** + * Whether the container runtime should close the stdin channel after it has been opened by + * a single attach. When stdin is true the stdin stream will remain open across multiple attach + * sessions. If stdinOnce is set to true, stdin is opened on container start, is empty until the + * first client attaches to stdin, and then remains open and accepts data until the client disconnects, + * at which time stdin is closed and remains closed until the container is restarted. If this + * flag is false, a container processes that reads from stdin will never receive an EOF. + * Default is false + */ + "stdinOnce"?: boolean; + /** + * Optional: Path at which the file to which the container's termination message + * will be written is mounted into the container's filesystem. + * Message written is intended to be brief final status, such as an assertion failure message. + * Will be truncated by the node if greater than 4096 bytes. The total message length across + * all containers will be limited to 12kb. + * Defaults to /dev/termination-log. + * Cannot be updated. + */ + "terminationMessagePath"?: string; + /** + * Indicate how the termination message should be populated. File will use the contents of + * terminationMessagePath to populate the container status message on both success and failure. + * FallbackToLogsOnError 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. + */ + "terminationMessagePolicy"?: string; + /** + * Whether this container should allocate a TTY for itself, also requires 'stdin' to be true. + * Default is false. + */ + "tty"?: boolean; + /** + * volumeDevices is the list of block devices to be used by the container. + */ + "volumeDevices"?: Array<{ + /** + * devicePath is the path inside of the container that the device will be mapped to. + */ + "devicePath": string; + /** + * name must match the name of a persistentVolumeClaim in the pod + */ + "name": string; + }>; + /** + * Pod volumes to mount into the container's filesystem. + * Cannot be updated. + */ + "volumeMounts"?: Array<{ + /** + * Path within the container at which the volume should be mounted. Must + * not contain ':'. + */ + "mountPath": string; + /** + * 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. + * When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified + * (which defaults to None). + */ + "mountPropagation"?: string; + /** + * This must match the Name of a Volume. + */ + "name": string; + /** + * Mounted read-only if true, read-write otherwise (false or unspecified). + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * RecursiveReadOnly specifies whether read-only mounts should be handled + * recursively. + * + * If ReadOnly is false, this field has no meaning and must be unspecified. + * + * If 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. + * + * If this field is set to IfPossible or Enabled, MountPropagation must be set to + * None (or be unspecified, which defaults to None). + * + * If this field is not specified, it is treated as an equivalent of Disabled. + */ + "recursiveReadOnly"?: string; + /** + * Path within the volume from which the container's volume should be mounted. + * Defaults to "" (volume's root). + */ + "subPath"?: string; + /** + * Expanded path within the volume from which the container's volume should be mounted. + * Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. + * Defaults to "" (volume's root). + * SubPathExpr and SubPath are mutually exclusive. + */ + "subPathExpr"?: string; + }>; + /** + * Container's working directory. + * If not specified, the container runtime's default will be used, which + * might be configured in the container image. + * Cannot be updated. + */ + "workingDir"?: string; + }>; + /** + * NodeName indicates in which node this pod is scheduled. + * If empty, this pod is a candidate for scheduling by the scheduler defined in schedulerName. + * Once this field is set, the kubelet for this node becomes responsible for the lifecycle of this pod. + * This field should not be used to express a desire for the pod to be scheduled on a specific node. + * https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodename + */ + "nodeName"?: string; + /** + * NodeSelector is a selector which must be true for the pod to fit on a node. + * Selector which must match a node's labels for the pod to be scheduled on that node. + * More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + */ + "nodeSelector"?: { + [key: string]: string; + }; + /** + * Specifies the OS of the containers in the pod. + * Some pod and container fields are restricted if this is set. + * + * If the OS field is set to linux, the following fields must be unset: + * -securityContext.windowsOptions + * + * If the OS field is set to windows, following fields must be unset: + * - spec.hostPID + * - spec.hostIPC + * - spec.hostUsers + * - spec.resources + * - spec.securityContext.appArmorProfile + * - spec.securityContext.seLinuxOptions + * - spec.securityContext.seccompProfile + * - spec.securityContext.fsGroup + * - spec.securityContext.fsGroupChangePolicy + * - spec.securityContext.sysctls + * - spec.shareProcessNamespace + * - spec.securityContext.runAsUser + * - spec.securityContext.runAsGroup + * - spec.securityContext.supplementalGroups + * - spec.securityContext.supplementalGroupsPolicy + * - spec.containers[\*].securityContext.appArmorProfile + * - spec.containers[\*].securityContext.seLinuxOptions + * - spec.containers[\*].securityContext.seccompProfile + * - spec.containers[\*].securityContext.capabilities + * - spec.containers[\*].securityContext.readOnlyRootFilesystem + * - spec.containers[\*].securityContext.privileged + * - spec.containers[\*].securityContext.allowPrivilegeEscalation + * - spec.containers[\*].securityContext.procMount + * - spec.containers[\*].securityContext.runAsUser + * - spec.containers[\*].securityContext.runAsGroup + */ + "os"?: { + /** + * Name is the name of the operating system. The currently supported values are linux and windows. + * Additional value may be defined in future and can be one of: + * https://github.com/opencontainers/runtime-spec/blob/master/config.md#platform-specific-configuration + * Clients should expect to handle additional values and treat unrecognized values in this field as os: null + */ + "name": string; + }; + /** + * Overhead represents the resource overhead associated with running a pod for a given RuntimeClass. + * This field will be autopopulated at admission time by the RuntimeClass admission controller. If + * the RuntimeClass admission controller is enabled, overhead must not be set in Pod create requests. + * The RuntimeClass admission controller will reject Pod create requests which have the overhead already + * set. If RuntimeClass is configured and selected in the PodSpec, Overhead will be set to the value + * defined in the corresponding RuntimeClass, otherwise it will remain unset and treated as zero. + * More info: https://git.k8s.io/enhancements/keps/sig-node/688-pod-overhead/README.md + */ + "overhead"?: { + [key: string]: number | string; + }; + /** + * PreemptionPolicy is the Policy for preempting pods with lower priority. + * One of Never, PreemptLowerPriority. + * Defaults to PreemptLowerPriority if unset. + */ + "preemptionPolicy"?: string; + /** + * The priority value. Various system components use this field to find the + * priority of the pod. When Priority Admission Controller is enabled, it + * prevents users from setting this field. The admission controller populates + * this field from PriorityClassName. + * The higher the value, the higher the priority. + */ + "priority"?: number; + /** + * If specified, indicates the pod's priority. "system-node-critical" and + * "system-cluster-critical" are two special keywords which indicate the + * highest priorities with the former being the highest priority. Any other + * name must be defined by creating a PriorityClass object with that name. + * If not specified, the pod priority will be default or zero if there is no + * default. + */ + "priorityClassName"?: string; + /** + * If specified, all readiness gates will be evaluated for pod readiness. + * A pod is ready when all its containers are ready AND + * all conditions specified in the readiness gates have status equal to "True" + * More info: https://git.k8s.io/enhancements/keps/sig-network/580-pod-readiness-gates + */ + "readinessGates"?: Array<{ + /** + * ConditionType refers to a condition in the pod's condition list with matching type. + */ + "conditionType": string; + }>; + /** + * ResourceClaims defines which ResourceClaims must be allocated + * and reserved before the Pod is allowed to start. The resources + * will be made available to those containers which consume them + * by name. + * + * This is a stable field but requires that the + * DynamicResourceAllocation feature gate is enabled. + * + * This field is immutable. + */ + "resourceClaims"?: Array<{ + /** + * Name uniquely identifies this resource claim inside the pod. + * This must be a DNS_LABEL. + */ + "name": string; + /** + * ResourceClaimName is the name of a ResourceClaim object in the same + * namespace as this pod. + * + * Exactly one of ResourceClaimName and ResourceClaimTemplateName must + * be set. + */ + "resourceClaimName"?: string; + /** + * ResourceClaimTemplateName is the name of a ResourceClaimTemplate + * object in the same namespace as this pod. + * + * The template will be used to create a new ResourceClaim, which will + * be bound to this pod. When this pod is deleted, the ResourceClaim + * will also be deleted. The pod name and resource name, along with a + * generated component, will be used to form a unique name for the + * ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. + * + * When the DRAWorkloadResourceClaims feature gate is enabled and the pod + * belongs to a PodGroup that defines a PodGroupResourceClaim with the same + * Name and ResourceClaimTemplateName, this PodResourceClaim resolves to the + * ResourceClaim generated for the PodGroup. All pods in the group that + * define an equivalent PodResourceClaim matching the + * PodGroupResourceClaim's Name and ResourceClaimTemplateName share the same + * generated ResourceClaim. ResourceClaims generated for a PodGroup are + * owned by the PodGroup and their lifecycles are tied to the PodGroup + * instead of any individual pod. + * + * This field is immutable and no changes will be made to the + * corresponding ResourceClaim by the control plane after creating the + * ResourceClaim. + * + * Exactly one of ResourceClaimName and ResourceClaimTemplateName must + * be set. + */ + "resourceClaimTemplateName"?: string; + }>; + /** + * Resources is the total amount of CPU and Memory resources required by all + * containers in the pod. It supports specifying Requests and Limits for + * "cpu", "memory" and "hugepages-" resource names only. ResourceClaims are not supported. + * + * This field enables fine-grained control over resource allocation for the + * entire pod, allowing resource sharing among containers in a pod. + * + * This is an alpha field and requires enabling the PodLevelResources feature + * gate. + */ + "resources"?: { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, + * that are used by this container. + * + * This field depends on the + * DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + */ + "claims"?: Array<{ + /** + * 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. + */ + "name": string; + /** + * Request is the name chosen for a request in the referenced claim. + * If empty, everything from the claim is made available, otherwise + * only the result of this request. + */ + "request"?: string; + }>; + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * Restart policy for all containers within the pod. + * One of Always, OnFailure, Never. In some contexts, only a subset of those values may be permitted. + * Default to Always. + * More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy + */ + "restartPolicy"?: string; + /** + * RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used + * to run this pod. If no RuntimeClass resource matches the named class, the pod will not be run. + * If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an + * empty definition that uses the default runtime handler. + * More info: https://git.k8s.io/enhancements/keps/sig-node/585-runtime-class + */ + "runtimeClassName"?: string; + /** + * If specified, the pod will be dispatched by specified scheduler. + * If not specified, the pod will be dispatched by default scheduler. + */ + "schedulerName"?: string; + /** + * SchedulingGates is an opaque list of values that if specified will block scheduling the pod. + * If schedulingGates is not empty, the pod will stay in the SchedulingGated state and the + * scheduler will not attempt to schedule the pod. + * + * SchedulingGates can only be set at pod creation time, and be removed only afterwards. + */ + "schedulingGates"?: Array<{ + /** + * Name of the scheduling gate. + * Each scheduling gate must have a unique name field. + */ + "name": string; + }>; + /** + * SchedulingGroup provides a reference to the immediate scheduling runtime + * grouping object that this Pod belongs to. + * This field is used by the scheduler to identify the group and apply the + * correct group scheduling policies. The association with a group also + * impacts other lifecycle aspects of a Pod that are relevant in a wider context + * of scheduling like preemption, resource attachment, etc. If not specified, + * the Pod is treated as a single unit in all of these aspects. + * The group object referenced by this field may not exist at the time the + * Pod is created. + * This field is immutable, but a group object with the same name may be + * recreated with different policies. Doing this during pod scheduling + * may result in the placement not conforming to the expected policies. + */ + "schedulingGroup"?: { + /** + * PodGroupName specifies the name of the standalone PodGroup object + * that represents the runtime instance of this group. + * Must be a DNS subdomain. + */ + "podGroupName"?: string; + }; + /** + * SecurityContext holds pod-level security attributes and common container settings. + * Optional: Defaults to empty. See type description for default values of each field. + */ + "securityContext"?: { + /** + * 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. + */ + "appArmorProfile"?: { + /** + * 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". + */ + "localhostProfile"?: string; + /** + * type indicates which kind of AppArmor profile will be applied. + * Valid options are: + * Localhost - a profile pre-loaded on the node. + * RuntimeDefault - the container runtime's default profile. + * Unconfined - no AppArmor enforcement. + */ + "type": string; + }; + /** + * A special supplemental group that applies to all containers in a pod. + * Some volume types allow the Kubelet to change the ownership of that volume + * to be owned by the pod: + * + * 1. The owning GID will be the FSGroup + * 2. The setgid bit is set (new files created in the volume will be owned by FSGroup) + * 3. The permission bits are OR'd with rw-rw---- + * + * If unset, the Kubelet will not modify the ownership and permissions of any volume. + * Note that this field cannot be set when spec.os.name is windows. + */ + "fsGroup"?: number; + /** + * fsGroupChangePolicy defines behavior of changing ownership and permission of the volume + * before being exposed inside Pod. This field will only apply to + * volume types which support fsGroup based ownership(and permissions). + * It will have no effect on ephemeral volume types such as: secret, configmaps + * and emptydir. + * Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used. + * Note that this field cannot be set when spec.os.name is windows. + */ + "fsGroupChangePolicy"?: string; + /** + * The GID to run the entrypoint of the container process. + * Uses runtime default if unset. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence + * for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsGroup"?: number; + /** + * Indicates that the container must run as a non-root user. + * If true, the Kubelet will validate the image at runtime to ensure that it + * does not run as UID 0 (root) and fail to start the container if it does. + * If unset or false, no such validation will be performed. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsNonRoot"?: boolean; + /** + * The UID to run the entrypoint of the container process. + * Defaults to user specified in image metadata if unspecified. + * May also be set in SecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence + * for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "runAsUser"?: number; + /** + * seLinuxChangePolicy defines how the container's SELinux label is applied to all volumes used by the Pod. + * It has no effect on nodes that do not support SELinux or to volumes does not support SELinux. + * Valid values are "MountOption" and "Recursive". + * + * "Recursive" means relabeling of all files on all Pod volumes by the container runtime. + * This may be slow for large volumes, but allows mixing privileged and unprivileged Pods sharing the same volume on the same node. + * + * "MountOption" mounts all eligible Pod volumes with `-o context` mount option. + * This requires all Pods that share the same volume to use the same SELinux label. + * It is not possible to share the same volume among privileged and unprivileged Pods. + * Eligible volumes are in-tree FibreChannel and iSCSI volumes, and all CSI volumes + * whose CSI driver announces SELinux support by setting spec.seLinuxMount: true in their + * CSIDriver instance. Other volumes are always re-labelled recursively. + * "MountOption" value is allowed only when SELinuxMount feature gate is enabled. + * + * If not specified and SELinuxMount feature gate is enabled, "MountOption" is used. + * If not specified and SELinuxMount feature gate is disabled, "MountOption" is used for ReadWriteOncePod volumes + * and "Recursive" for all other volumes. + * + * This field affects only Pods that have SELinux label set, either in PodSecurityContext or in SecurityContext of all containers. + * + * All Pods that use the same volume should use the same seLinuxChangePolicy, otherwise some pods can get stuck in ContainerCreating state. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxChangePolicy"?: string; + /** + * The SELinux context to be applied to all containers. + * If unspecified, the container runtime will allocate a random SELinux context for each + * container. May also be set in SecurityContext. If set in + * both SecurityContext and PodSecurityContext, the value specified in SecurityContext + * takes precedence for that container. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seLinuxOptions"?: { + /** + * Level is SELinux level label that applies to the container. + */ + "level"?: string; + /** + * Role is a SELinux role label that applies to the container. + */ + "role"?: string; + /** + * Type is a SELinux type label that applies to the container. + */ + "type"?: string; + /** + * User is a SELinux user label that applies to the container. + */ + "user"?: string; + }; + /** + * The seccomp options to use by the containers in this pod. + * Note that this field cannot be set when spec.os.name is windows. + */ + "seccompProfile"?: { + /** + * 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 be set if type is "Localhost". Must NOT be set for any other type. + */ + "localhostProfile"?: string; + /** + * type indicates which kind of seccomp profile will be applied. + * Valid options are: + * + * Localhost - 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. + */ + "type": string; + }; + /** + * A list of groups applied to the first process run in each container, in + * addition to the container's primary GID and fsGroup (if specified). If + * the SupplementalGroupsPolicy feature is enabled, the + * supplementalGroupsPolicy field determines whether these are in addition + * to or instead of any group memberships defined in the container image. + * If unspecified, no additional groups are added, though group memberships + * defined in the container image may still be used, depending on the + * supplementalGroupsPolicy field. + * Note that this field cannot be set when spec.os.name is windows. + */ + "supplementalGroups"?: Array; + /** + * Defines how supplemental groups of the first container processes are calculated. + * Valid values are "Merge" and "Strict". If not specified, "Merge" is used. + * (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled + * and the container runtime must implement support for this feature. + * Note that this field cannot be set when spec.os.name is windows. + */ + "supplementalGroupsPolicy"?: string; + /** + * Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported + * sysctls (by the container runtime) might fail to launch. + * Note that this field cannot be set when spec.os.name is windows. + */ + "sysctls"?: Array<{ + /** + * Name of a property to set + */ + "name": string; + /** + * Value of a property to set + */ + "value": string; + }>; + /** + * The Windows specific settings applied to all containers. + * If unspecified, the options within a container's SecurityContext will be used. + * If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence. + * Note that this field cannot be set when spec.os.name is linux. + */ + "windowsOptions"?: { + /** + * GMSACredentialSpec is where the GMSA admission webhook + * (https://github.com/kubernetes-sigs/windows-gmsa) inlines the contents of the + * GMSA credential spec named by the GMSACredentialSpecName field. + */ + "gmsaCredentialSpec"?: string; + /** + * GMSACredentialSpecName is the name of the GMSA credential spec to use. + */ + "gmsaCredentialSpecName"?: string; + /** + * HostProcess determines if a container should be run as a 'Host 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. + */ + "hostProcess"?: boolean; + /** + * The UserName in Windows to run the entrypoint of the container process. + * Defaults to the user specified in image metadata if unspecified. + * May also be set in PodSecurityContext. If set in both SecurityContext and + * PodSecurityContext, the value specified in SecurityContext takes precedence. + */ + "runAsUserName"?: string; + }; + }; + /** + * DeprecatedServiceAccount is a deprecated alias for ServiceAccountName. + * Deprecated: Use serviceAccountName instead. + */ + "serviceAccount"?: string; + /** + * ServiceAccountName is the name of the ServiceAccount to use to run this pod. + * More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ + */ + "serviceAccountName"?: string; + /** + * If true the pod's hostname will be configured as the pod's FQDN, rather than the leaf name (the default). + * In Linux containers, this means setting the FQDN in the hostname field of the kernel (the nodename field of struct utsname). + * In Windows containers, this means setting the registry value of hostname for the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters to FQDN. + * If a pod does not have FQDN, this has no effect. + * Default to false. + */ + "setHostnameAsFQDN"?: boolean; + /** + * Share a single process namespace between all of the containers in a pod. + * When this is set containers will be able to view and signal processes from other containers + * in the same pod, and the first process in each container will not be assigned PID 1. + * HostPID and ShareProcessNamespace cannot both be set. + * Optional: Default to false. + */ + "shareProcessNamespace"?: boolean; + /** + * If specified, the fully qualified Pod hostname will be "...svc.". + * If not specified, the pod will not have a domainname at all. + */ + "subdomain"?: string; + /** + * Optional duration in seconds the pod needs to terminate gracefully. May be decreased in delete request. + * Value must be non-negative integer. The value zero indicates stop immediately via + * the kill signal (no opportunity to shut down). + * If this value is nil, the default grace period will be used instead. + * The grace period is the duration in seconds after the processes running in the pod are sent + * a termination signal and the time when the processes are forcibly halted with a kill signal. + * Set this value longer than the expected cleanup time for your process. + * Defaults to 30 seconds. + */ + "terminationGracePeriodSeconds"?: number; + /** + * If specified, the pod's tolerations. + */ + "tolerations"?: Array<{ + /** + * Effect indicates the taint effect to match. Empty means match all taint effects. + * When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + */ + "effect"?: string; + /** + * Key is the taint key that the toleration applies to. Empty means match all taint keys. + * If the key is empty, operator must be Exists; this combination means to match all values and all keys. + */ + "key"?: string; + /** + * Operator represents a key's relationship to the value. + * Valid operators are Exists, Equal, Lt, and Gt. Defaults to Equal. + * Exists is equivalent to wildcard for value, so that a pod can + * tolerate all taints of a particular category. + * Lt and Gt perform numeric comparisons (requires feature gate TaintTolerationComparisonOperators). + */ + "operator"?: string; + /** + * TolerationSeconds represents the period of time the toleration (which must be + * of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, + * it is not set, which means tolerate the taint forever (do not evict). Zero and + * negative values will be treated as 0 (evict immediately) by the system. + */ + "tolerationSeconds"?: number; + /** + * Value is the taint value the toleration matches to. + * If the operator is Exists, the value should be empty, otherwise just a regular string. + */ + "value"?: string; + }>; + /** + * TopologySpreadConstraints describes how a group of pods ought to spread across topology + * domains. Scheduler will schedule pods in a way which abides by the constraints. + * All topologySpreadConstraints are ANDed. + */ + "topologySpreadConstraints"?: Array<{ + /** + * LabelSelector is used to find matching pods. + * Pods that match this label selector are counted to determine the number of pods + * in their corresponding topology domain. + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * MatchLabelKeys is a set of pod label keys to select the pods over which + * spreading will be calculated. The keys are used to lookup values from the + * incoming pod labels, those key-value labels are ANDed with labelSelector + * to select the group of existing pods over which spreading will be calculated + * for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. + * MatchLabelKeys cannot be set when LabelSelector isn't set. + * Keys that don't exist in the incoming pod labels will + * be ignored. A null or empty list means only match against labelSelector. + * + * This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default). + */ + "matchLabelKeys"?: Array; + /** + * MaxSkew describes the degree to which pods may be unevenly distributed. + * When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference + * between the number of matching pods in the target topology and the global minimum. + * The global minimum is the minimum number of matching pods in an eligible domain + * or zero if the number of eligible domains is less than MinDomains. + * For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + * labelSelector spread as 2/2/1: + * In this case, the global minimum is 1. + * | zone1 | zone2 | zone3 | + * | P P | P P | P | + * - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; + * scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) + * violate MaxSkew(1). + * - if MaxSkew is 2, incoming pod can be scheduled onto any zone. + * When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence + * to topologies that satisfy it. + * It's a required field. Default value is 1 and 0 is not allowed. + */ + "maxSkew": number; + /** + * MinDomains indicates a minimum number of eligible domains. + * When the number of eligible domains with matching topology keys is less than minDomains, + * Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. + * And when the number of eligible domains with matching topology keys equals or greater than minDomains, + * this value has no effect on scheduling. + * As a result, when the number of eligible domains is less than minDomains, + * scheduler won't schedule more than maxSkew Pods to those domains. + * If value is nil, the constraint behaves as if MinDomains is equal to 1. + * Valid values are integers greater than 0. + * When value is not nil, WhenUnsatisfiable must be DoNotSchedule. + * + * For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same + * labelSelector spread as 2/2/2: + * | zone1 | zone2 | zone3 | + * | P P | P P | P P | + * The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. + * In this situation, new pod with the same labelSelector cannot be scheduled, + * because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, + * it will violate MaxSkew. + */ + "minDomains"?: number; + /** + * NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector + * when calculating pod topology spread skew. Options are: + * - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. + * - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations. + * + * If this value is nil, the behavior is equivalent to the Honor policy. + */ + "nodeAffinityPolicy"?: string; + /** + * NodeTaintsPolicy indicates how we will treat node taints when calculating + * pod topology spread skew. Options are: + * - Honor: nodes without taints, along with tainted nodes for which the incoming pod + * has a toleration, are included. + * - Ignore: node taints are ignored. All nodes are included. + * + * If this value is nil, the behavior is equivalent to the Ignore policy. + */ + "nodeTaintsPolicy"?: string; + /** + * TopologyKey is the key of node labels. Nodes that have a label with this key + * and identical values are considered to be in the same topology. + * We consider each as a "bucket", and try to put balanced number + * of pods into each bucket. + * We define a domain as a particular instance of a topology. + * Also, we define an eligible domain as a domain whose nodes meet the requirements of + * nodeAffinityPolicy and nodeTaintsPolicy. + * e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. + * And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. + * It's a required field. + */ + "topologyKey": string; + /** + * WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy + * the spread constraint. + * - DoNotSchedule (default) tells the scheduler not to schedule it. + * - ScheduleAnyway tells the scheduler to schedule the pod in any location, + * but giving higher precedence to topologies that would help reduce the + * skew. + * A constraint is considered "Unsatisfiable" for an incoming pod + * if and only if every possible node assignment for that pod would violate + * "MaxSkew" on some topology. + * For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same + * labelSelector spread as 3/1/1: + * | zone1 | zone2 | zone3 | + * | P P P | P | P | + * If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled + * to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies + * MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler + * won't make it \*more\* imbalanced. + * It's a required field. + */ + "whenUnsatisfiable": string; + }>; + /** + * List of volumes that can be mounted by containers belonging to the pod. + * More info: https://kubernetes.io/docs/concepts/storage/volumes + */ + "volumes"?: Array<{ + /** + * awsElasticBlockStore represents an AWS Disk resource that is attached to a + * kubelet's host machine and then exposed to the pod. + * Deprecated: AWSElasticBlockStore is deprecated. All operations for the in-tree + * awsElasticBlockStore type are redirected to the ebs.csi.aws.com CSI driver. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "awsElasticBlockStore"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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). + */ + "partition"?: number; + /** + * readOnly value true will force the readOnly setting in VolumeMounts. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "readOnly"?: boolean; + /** + * volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). + * More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + */ + "volumeID": string; + }; + /** + * azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. + * Deprecated: AzureDisk is deprecated. All operations for the in-tree azureDisk type + * are redirected to the disk.csi.azure.com CSI driver. + */ + "azureDisk"?: { + /** + * cachingMode is the Host Caching mode: None, Read Only, Read Write. + */ + "cachingMode"?: string; + /** + * diskName is the Name of the data disk in the blob storage + */ + "diskName": string; + /** + * diskURI is the URI of data disk in the blob storage + */ + "diskURI": string; + /** + * 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. + */ + "fsType"?: string; + /** + * 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 + */ + "kind"?: string; + /** + * readOnly Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + }; + /** + * azureFile represents an Azure File Service mount on the host and bind mount to the pod. + * Deprecated: AzureFile is deprecated. All operations for the in-tree azureFile type + * are redirected to the file.csi.azure.com CSI driver. + */ + "azureFile"?: { + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretName is the name of secret that contains Azure Storage Account Name and Key + */ + "secretName": string; + /** + * shareName is the azure share Name + */ + "shareName": string; + }; + /** + * cephFS represents a Ceph FS mount on the host that shares a pod's lifetime. + * Deprecated: CephFS is deprecated and the in-tree cephfs type is no longer supported. + */ + "cephfs"?: { + /** + * monitors is Required: Monitors is a collection of Ceph monitors + * More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it + */ + "monitors": Array; + /** + * path is Optional: Used as the mounted root, rather than the full Ceph tree, default is / + */ + "path"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * 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 + */ + "secretFile"?: string; + /** + * 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 + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * 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 + */ + "user"?: string; + }; + /** + * cinder represents a cinder volume attached and mounted on kubelets host machine. + * Deprecated: Cinder is deprecated. All operations for the in-tree cinder type + * are redirected to the cinder.csi.openstack.org CSI driver. + * More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "cinder"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * secretRef is optional: points to a secret object containing parameters used to connect + * to OpenStack. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * volumeID used to identify the volume in cinder. + * More info: https://examples.k8s.io/mysql-cinder-pd/README.md + */ + "volumeID": string; + }; + /** + * configMap represents a configMap that should populate this volume + */ + "configMap"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * 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 keys will not be + * present. If a key is specified which is not present in the ConfigMap, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; + }; + /** + * csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers. + */ + "csi"?: { + /** + * 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. + */ + "driver": string; + /** + * 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. + */ + "fsType"?: string; + /** + * 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 object contains more than one secret, all secret references are passed. + */ + "nodePublishSecretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * readOnly specifies a read-only configuration for the volume. + * Defaults to false (read/write). + */ + "readOnly"?: boolean; + /** + * volumeAttributes stores driver-specific properties that are passed to the CSI + * driver. Consult your driver's documentation for supported values. + */ + "volumeAttributes"?: { + [key: string]: string; + }; + }; + /** + * downwardAPI represents downward API about the pod that should populate this volume + */ + "downwardAPI"?: { + /** + * Optional: mode bits to use on created files by default. Must be a + * 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. + */ + "defaultMode"?: number; + /** + * Items is a list of downward API volume file + */ + "items"?: Array<{ + /** + * Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + */ + "path": string; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + }>; + }; + /** + * emptyDir represents a temporary directory that shares a pod's lifetime. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir + */ + "emptyDir"?: { + /** + * 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 + */ + "medium"?: string; + /** + * 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 + */ + "sizeLimit"?: number | string; + }; + /** + * ephemeral represents a volume that is handled by a cluster storage driver. + * The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, + * and deleted when the pod is removed. + * + * Use this if: + * a) the volume is only needed while the pod runs, + * b) features of normal volumes like restoring from snapshot or capacity + * tracking are needed, + * c) the storage driver is specified through a storage class, and + * d) the storage driver supports dynamic volume provisioning through + * a PersistentVolumeClaim (see EphemeralVolumeSource for more + * information on the connection between this volume type + * and PersistentVolumeClaim). + * + * Use PersistentVolumeClaim or one of the vendor-specific + * APIs for volumes that persist for longer than the lifecycle + * of an individual pod. + * + * Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to + * be used that way - see the documentation of the driver for + * more information. + * + * A pod can use both types of ephemeral volumes and + * persistent volumes at the same time. + */ + "ephemeral"?: { + /** + * Will be used to create a stand-alone PVC to provision the volume. + * The pod in which this EphemeralVolumeSource is embedded will be the + * owner of the PVC, i.e. the PVC will be deleted together with the + * pod. The name of the PVC will be `-` where + * `` is the name from the `PodSpec.Volumes` array + * entry. Pod validation will reject the pod if the concatenated name + * is not valid for a PVC (for example, too long). + * + * An existing PVC with that name that is not owned by the pod + * will \*not\* be used for the pod to avoid using an unrelated + * volume by mistake. Starting the pod is then blocked until + * the unrelated PVC is removed. If such a pre-created PVC is + * meant to be used by the pod, the PVC has to updated with an + * owner reference to the pod once the pod exists. Normally + * this should not be necessary, but it may be useful when + * manually reconstructing a broken cluster. + * + * This field is read-only and no changes will be made by Kubernetes + * to the PVC after it has been created. + * + * Required, must not be nil. + */ + "volumeClaimTemplate"?: { + /** + * May contain labels and annotations that will be copied into the PVC + * when creating it. No other fields are allowed and will be rejected during + * validation. + */ + "metadata"?: { + "annotations"?: { + [key: string]: string; + }; + "finalizers"?: Array; + "labels"?: { + [key: string]: string; + }; + "name"?: string; + "namespace"?: string; + }; + /** + * The specification for the PersistentVolumeClaim. The entire content is + * copied unchanged into the PVC that gets created from this + * template. The same fields as in a PersistentVolumeClaim + * are also valid here. + */ + "spec": { + /** + * accessModes contains the desired access modes the volume should have. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + */ + "accessModes"?: Array; + /** + * 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. + */ + "dataSource"?: { + /** + * APIGroup is the group for the resource being referenced. + * If APIGroup is not specified, the specified Kind must be in the core API group. + * For any other third-party types, APIGroup is required. + */ + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; + }; + /** + * 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. + * 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 + * allows any non-core object, as well as PersistentVolumeClaim objects. + * \* While dataSource ignores disallowed values (dropping them), dataSourceRef + * preserves all values, and generates an error if a disallowed value is + * specified. + * \* While dataSource only allows local objects, dataSourceRef allows objects + * in any namespaces. + * (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. + */ + "dataSourceRef"?: { + /** + * APIGroup is the group for the resource being referenced. + * If APIGroup is not specified, the specified Kind must be in the core API group. + * For any other third-party types, APIGroup is required. + */ + "apiGroup"?: string; + /** + * Kind is the type of resource being referenced + */ + "kind": string; + /** + * Name is the name of resource being referenced + */ + "name": string; + /** + * Namespace is the namespace of 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. + */ + "namespace"?: string; + }; + /** + * resources represents the minimum resources the volume should have. + * 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 the claim. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + */ + "resources"?: { + /** + * Limits describes the maximum amount of compute resources allowed. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "limits"?: { + [key: string]: number | string; + }; + /** + * Requests describes the minimum amount of compute resources required. + * If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + * otherwise to an implementation-defined value. Requests cannot exceed Limits. + * More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + */ + "requests"?: { + [key: string]: number | string; + }; + }; + /** + * selector is a label query over volumes to consider for binding. + */ + "selector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * storageClassName is the name of the StorageClass required by the claim. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 + */ + "storageClassName"?: string; + /** + * 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 or nil value indicates that no + * VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, + * this field can be reset to its previous value (including nil) to cancel the modification. + * 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/ + */ + "volumeAttributesClassName"?: string; + /** + * volumeMode defines what type of volume is required by the claim. + * Value of Filesystem is implied when not included in claim spec. + */ + "volumeMode"?: string; + /** + * volumeName is the binding reference to the PersistentVolume backing this claim. + */ + "volumeName"?: string; + }; + }; + }; + /** + * fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. + */ + "fc"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * lun is Optional: FC target lun number + */ + "lun"?: number; + /** + * readOnly is Optional: Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * targetWWNs is Optional: FC target worldwide names (WWNs) + */ + "targetWWNs"?: Array; + /** + * wwids Optional: FC volume world wide identifiers (wwids) + * Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously. + */ + "wwids"?: Array; + }; + /** + * flexVolume represents a generic volume resource that is + * provisioned/attached using an exec based plugin. + * Deprecated: FlexVolume is deprecated. Consider using a CSIDriver instead. + */ + "flexVolume"?: { + /** + * driver is the name of the driver to use for this volume. + */ + "driver": string; + /** + * 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. + */ + "fsType"?: string; + /** + * options is Optional: this field holds extra command options if any. + */ + "options"?: { + [key: string]: string; + }; + /** + * readOnly is Optional: defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * 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. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + }; + /** + * flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running. + * Deprecated: Flocker is deprecated and the in-tree flocker type is no longer supported. + */ + "flocker"?: { + /** + * datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker + * should be considered as deprecated + */ + "datasetName"?: string; + /** + * datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset + */ + "datasetUUID"?: string; + }; + /** + * gcePersistentDisk represents a GCE Disk resource that is attached to a + * kubelet's host machine and then exposed to the pod. + * Deprecated: GCEPersistentDisk is deprecated. All operations for the in-tree + * gcePersistentDisk type are redirected to the pd.csi.storage.gke.io CSI driver. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + */ + "gcePersistentDisk"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * 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 + */ + "partition"?: number; + /** + * 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 + */ + "pdName": string; + /** + * readOnly here will force the ReadOnly setting in VolumeMounts. + * Defaults to false. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk + */ + "readOnly"?: boolean; + }; + /** + * 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. + */ + "gitRepo"?: { + /** + * 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. + */ + "directory"?: string; + /** + * repository is the URL + */ + "repository": string; + /** + * revision is the commit hash for the specified revision. + */ + "revision"?: string; + }; + /** + * glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. + * Deprecated: Glusterfs is deprecated and the in-tree glusterfs type is no longer supported. + */ + "glusterfs"?: { + /** + * endpoints is the endpoint name that details Glusterfs topology. + */ + "endpoints": string; + /** + * path is the Glusterfs volume path. + * More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod + */ + "path": string; + /** + * 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 + */ + "readOnly"?: boolean; + }; + /** + * 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: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + */ + "hostPath"?: { + /** + * 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 + */ + "path": string; + /** + * type for HostPath Volume + * Defaults to "" + * More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath + */ + "type"?: string; + }; + /** + * image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine. + * The volume is resolved at pod startup depending on which PullPolicy value is provided: + * + * - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + * - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + * - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + * + * The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation. + * A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message. + * The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field. + * The OCI object gets mounted in a single directory (spec.containers[\*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images. + * The volume will be mounted read-only (ro). + * Sub path mounts for containers are not supported (spec.containers[\*].volumeMounts.subpath) before 1.33. + * The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type. + */ + "image"?: { + /** + * Policy for pulling OCI objects. Possible values are: + * Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails. + * Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present. + * IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails. + * Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. + */ + "pullPolicy"?: string; + /** + * Required: Image or artifact reference to be used. + * Behaves in the same way as pod.spec.containers[\*].image. + * Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets. + * 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 and StatefulSets. + */ + "reference"?: string; + }; + /** + * iscsi represents an ISCSI 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/#iscsi + */ + "iscsi"?: { + /** + * chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication + */ + "chapAuthDiscovery"?: boolean; + /** + * chapAuthSession defines whether support iSCSI Session CHAP authentication + */ + "chapAuthSession"?: boolean; + /** + * 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 + */ + "fsType"?: string; + /** + * initiatorName is the custom iSCSI Initiator Name. + * If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface + * : will be created for the connection. + */ + "initiatorName"?: string; + /** + * iqn is the target iSCSI Qualified Name. + */ + "iqn": string; + /** + * iscsiInterface is the interface Name that uses an iSCSI transport. + * Defaults to 'default' (tcp). + */ + "iscsiInterface"?: string; + /** + * lun represents iSCSI Target Lun number. + */ + "lun": number; + /** + * 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). + */ + "portals"?: Array; + /** + * readOnly here will force the ReadOnly setting in VolumeMounts. + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * secretRef is the CHAP Secret for iSCSI target and initiator authentication + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * 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). + */ + "targetPortal": string; + }; + /** + * 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 + */ + "name": string; + /** + * nfs represents an NFS mount on the host that shares a pod's lifetime + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "nfs"?: { + /** + * path that is exported by the NFS server. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "path": string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * server is the hostname or IP address of the NFS server. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs + */ + "server": string; + }; + /** + * persistentVolumeClaimVolumeSource represents a reference to a + * PersistentVolumeClaim in the same namespace. + * More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + */ + "persistentVolumeClaim"?: { + /** + * 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 + */ + "claimName": string; + /** + * readOnly Will force the ReadOnly setting in VolumeMounts. + * Default false. + */ + "readOnly"?: boolean; + }; + /** + * photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine. + * Deprecated: PhotonPersistentDisk is deprecated and the in-tree photonPersistentDisk type is no longer supported. + */ + "photonPersistentDisk"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * pdID is the ID that identifies Photon Controller persistent disk + */ + "pdID": string; + }; + /** + * portworxVolume represents a portworx volume attached and mounted on kubelets host machine. + * Deprecated: PortworxVolume is deprecated. All operations for the in-tree portworxVolume type + * are redirected to the pxd.portworx.com CSI driver. + */ + "portworxVolume"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * volumeID uniquely identifies a Portworx volume + */ + "volumeID": string; + }; + /** + * projected items for all in one resources secrets, configmaps, and downward API + */ + "projected"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * sources is the list of volume projections. Each entry in this list + * handles one source. + */ + "sources"?: Array<{ + /** + * ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field + * of ClusterTrustBundle objects in an auto-updating file. + * + * Alpha, gated by the ClusterTrustBundleProjection feature gate. + * + * ClusterTrustBundle objects can either be selected by name, or by the + * combination of signer name and a label selector. + * + * Kubelet 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. + */ + "clusterTrustBundle"?: { + /** + * 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". + */ + "labelSelector"?: { + /** + * matchExpressions is a list of label selector requirements. The requirements are ANDed. + */ + "matchExpressions"?: Array<{ + /** + * key is the label key that the selector applies to. + */ + "key": string; + /** + * operator represents a key's relationship to a set of values. + * Valid operators are In, NotIn, Exists and DoesNotExist. + */ + "operator": string; + /** + * values is an array of string values. If the operator is In or NotIn, + * the values array must be non-empty. If the operator is Exists or DoesNotExist, + * the values array must be empty. This array is replaced during a strategic + * merge patch. + */ + "values"?: Array; + }>; + /** + * matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels + * map is equivalent to an element of matchExpressions, whose key field is "key", the + * operator is "In", and the values array contains only "value". The requirements are ANDed. + */ + "matchLabels"?: { + [key: string]: string; + }; + }; + /** + * Select a single ClusterTrustBundle by object name. Mutually-exclusive + * with signerName and labelSelector. + */ + "name"?: string; + /** + * 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. + */ + "optional"?: boolean; + /** + * Relative path from the volume root to write the bundle. + */ + "path": string; + /** + * Select all ClusterTrustBundles that match this signer name. + * Mutually-exclusive with name. The contents of all selected + * ClusterTrustBundles will be unified and deduplicated. + */ + "signerName"?: string; + }; + /** + * configMap information about the configMap data to project + */ + "configMap"?: { + /** + * 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 keys will not be + * present. If a key is specified which is not present in the ConfigMap, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional specify whether the ConfigMap or its keys must be defined + */ + "optional"?: boolean; + }; + /** + * downwardAPI information about the downwardAPI data to project + */ + "downwardAPI"?: { + /** + * Items is a list of DownwardAPIVolume file + */ + "items"?: Array<{ + /** + * Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported. + */ + "fieldRef"?: { + /** + * Version of the schema the FieldPath is written in terms of, defaults to "v1". + */ + "apiVersion"?: string; + /** + * Path of the field to select in the specified API version. + */ + "fieldPath": string; + }; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..' + */ + "path": string; + /** + * Selects a resource of the container: only resources limits and requests + * (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported. + */ + "resourceFieldRef"?: { + /** + * Container name: required for volumes, optional for env vars + */ + "containerName"?: string; + /** + * Specifies the output format of the exposed resources, defaults to "1" + */ + "divisor"?: number | string; + /** + * Required: resource to select + */ + "resource": string; + }; + }>; + }; + /** + * Projects an auto-rotating credential bundle (private key and certificate + * chain) that the pod can use either as a TLS client or server. + * + * Kubelet generates a private key and uses it to send a + * PodCertificateRequest to the named signer. Once the signer approves the + * request and issues a certificate chain, Kubelet writes the key and + * certificate chain to the pod filesystem. The pod does not start until + * certificates have been issued for each podCertificate projected volume + * source in its spec. + * + * Kubelet will begin trying to rotate the certificate at the time indicated + * by the signer using the PodCertificateRequest.Status.BeginRefreshAt + * timestamp. + * + * Kubelet can write a single file, indicated by the credentialBundlePath + * field, or separate files, indicated by the keyPath and + * certificateChainPath fields. + * + * The credential bundle is a single file in PEM format. The first PEM + * entry is the private key (in PKCS#8 format), and the remaining PEM + * entries are the certificate chain issued by the signer (typically, + * signers will return their certificate chain in leaf-to-root order). + * + * Prefer using the credential bundle format, since your application code + * can read it atomically. If you use keyPath and certificateChainPath, + * your application must make two separate file reads. If these coincide + * with a certificate rotation, it is possible that the private key and leaf + * certificate you read may not correspond to each other. Your application + * will need to check for this condition, and re-read until they are + * consistent. + * + * The named signer controls chooses the format of the certificate it + * issues; consult the signer implementation's documentation to learn how to + * use the certificates it issues. + */ + "podCertificate"?: { + /** + * Write the certificate chain at this path in the projected volume. + * + * Most applications should use credentialBundlePath. When using keyPath + * and certificateChainPath, your application needs to check that the key + * and leaf certificate are consistent, because it is possible to read the + * files mid-rotation. + */ + "certificateChainPath"?: string; + /** + * Write the credential bundle at this path in the projected volume. + * + * The credential bundle is a single file that contains multiple PEM blocks. + * The first PEM block is a PRIVATE KEY block, containing a PKCS#8 private + * key. + * + * The remaining blocks are CERTIFICATE blocks, containing the issued + * certificate chain from the signer (leaf and any intermediates). + * + * Using credentialBundlePath lets your Pod's application code make a single + * atomic read that retrieves a consistent key and certificate chain. If you + * project them to separate files, your application code will need to + * additionally check that the leaf certificate was issued to the key. + */ + "credentialBundlePath"?: string; + /** + * Write the key at this path in the projected volume. + * + * Most applications should use credentialBundlePath. When using keyPath + * and certificateChainPath, your application needs to check that the key + * and leaf certificate are consistent, because it is possible to read the + * files mid-rotation. + */ + "keyPath"?: string; + /** + * The type of keypair Kubelet will generate for the pod. + * + * Valid values are "RSA3072", "RSA4096", "ECDSAP256", "ECDSAP384", + * "ECDSAP521", and "ED25519". + */ + "keyType": string; + /** + * maxExpirationSeconds is the maximum lifetime permitted for the + * certificate. + * + * Kubelet copies this value verbatim into the PodCertificateRequests it + * generates for this projection. + * + * If omitted, kube-apiserver will set it to 86400(24 hours). kube-apiserver + * will reject values shorter than 3600 (1 hour). The maximum allowable + * value is 7862400 (91 days). + * + * The signer implementation is then free to issue a certificate with any + * lifetime \*shorter\* than MaxExpirationSeconds, but no shorter than 3600 + * seconds (1 hour). This constraint is enforced by kube-apiserver. + * `kubernetes.io` signers will never issue certificates with a lifetime + * longer than 24 hours. + */ + "maxExpirationSeconds"?: number; + /** + * Kubelet's generated CSRs will be addressed to this signer. + */ + "signerName": string; + /** + * userAnnotations allow pod authors to pass additional information to + * the signer implementation. Kubernetes does not restrict or validate this + * metadata in any way. + * + * These values are copied verbatim into the `spec.unverifiedUserAnnotations` field of + * the PodCertificateRequest objects that Kubelet creates. + * + * Entries are subject to the same validation as object metadata annotations, + * with the addition that all keys must be domain-prefixed. No restrictions + * are placed on values, except an overall size limitation on the entire field. + * + * Signers should document the keys and values they support. Signers should + * deny requests that contain keys they do not recognize. + */ + "userAnnotations"?: { + [key: string]: string; + }; + }; + /** + * secret information about the secret data to project + */ + "secret"?: { + /** + * 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 will not be + * present. If a key is specified which is not present in the Secret, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * 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 + */ + "name"?: string; + /** + * optional field specify whether the Secret or its key must be defined + */ + "optional"?: boolean; + }; + /** + * serviceAccountToken is information about the serviceAccountToken data to project + */ + "serviceAccountToken"?: { + /** + * 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. + */ + "audience"?: string; + /** + * 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 percent of + * its time to live or if the token is older than 24 hours.Defaults to 1 hour + * and must be at least 10 minutes. + */ + "expirationSeconds"?: number; + /** + * path is the path relative to the mount point of the file to project the + * token into. + */ + "path": string; + }; + }>; + }; + /** + * quobyte represents a Quobyte mount on the host that shares a pod's lifetime. + * Deprecated: Quobyte is deprecated and the in-tree quobyte type is no longer supported. + */ + "quobyte"?: { + /** + * group to map volume access to + * Default is no group + */ + "group"?: string; + /** + * readOnly here will force the Quobyte volume to be mounted with read-only permissions. + * Defaults to false. + */ + "readOnly"?: boolean; + /** + * 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 + */ + "registry": string; + /** + * tenant owning the given Quobyte volume in the Backend + * Used with dynamically provisioned Quobyte volumes, value is set by the plugin + */ + "tenant"?: string; + /** + * user to map volume access to + * Defaults to serivceaccount user + */ + "user"?: string; + /** + * volume is a string that references an already created Quobyte volume by name. + */ + "volume": string; + }; + /** + * rbd represents a Rados Block Device mount on the host that shares a pod's lifetime. + * Deprecated: RBD is deprecated and the in-tree rbd type is no longer supported. + */ + "rbd"?: { + /** + * 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 + */ + "fsType"?: string; + /** + * image is the rados image name. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "image": string; + /** + * 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 + */ + "keyring"?: string; + /** + * monitors is a collection of Ceph monitors. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "monitors": Array; + /** + * pool is the rados pool name. + * Default is rbd. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "pool"?: string; + /** + * 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 + */ + "readOnly"?: boolean; + /** + * 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 + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * user is the rados user name. + * Default is admin. + * More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it + */ + "user"?: string; + }; + /** + * scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. + * Deprecated: ScaleIO is deprecated and the in-tree scaleIO type is no longer supported. + */ + "scaleIO"?: { + /** + * 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". + */ + "fsType"?: string; + /** + * gateway is the host address of the ScaleIO API Gateway. + */ + "gateway": string; + /** + * protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. + */ + "protectionDomain"?: string; + /** + * readOnly Defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretRef references to the secret for ScaleIO user and other + * sensitive information. If this is not provided, Login operation will fail. + */ + "secretRef": { + /** + * 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 + */ + "name"?: string; + }; + /** + * sslEnabled Flag enable/disable SSL communication with Gateway, default false + */ + "sslEnabled"?: boolean; + /** + * storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. + * Default is ThinProvisioned. + */ + "storageMode"?: string; + /** + * storagePool is the ScaleIO Storage Pool associated with the protection domain. + */ + "storagePool"?: string; + /** + * system is the name of the storage system as configured in ScaleIO. + */ + "system": string; + /** + * volumeName is the name of a volume already created in the ScaleIO system + * that is associated with this volume source. + */ + "volumeName"?: string; + }; + /** + * secret represents a secret that should populate this volume. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + */ + "secret"?: { + /** + * 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. + */ + "defaultMode"?: number; + /** + * 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 will not be + * present. If a key is specified which is not present in the Secret, + * the volume setup will error unless it is marked optional. Paths must be + * relative and may not contain the '..' path or start with '..'. + */ + "items"?: Array<{ + /** + * key is the key to project. + */ + "key": string; + /** + * 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 be other mode bits set. + */ + "mode"?: number; + /** + * 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 '..'. + */ + "path": string; + }>; + /** + * optional field specify whether the Secret or its keys must be defined + */ + "optional"?: boolean; + /** + * secretName is the name of the secret in the pod's namespace to use. + * More info: https://kubernetes.io/docs/concepts/storage/volumes#secret + */ + "secretName"?: string; + }; + /** + * storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. + * Deprecated: StorageOS is deprecated and the in-tree storageos type is no longer supported. + */ + "storageos"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * readOnly defaults to false (read/write). ReadOnly here will force + * the ReadOnly setting in VolumeMounts. + */ + "readOnly"?: boolean; + /** + * secretRef specifies the secret to use for obtaining the StorageOS API + * credentials. If not specified, default values will be attempted. + */ + "secretRef"?: { + /** + * 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 + */ + "name"?: string; + }; + /** + * volumeName is the human-readable name of the StorageOS volume. Volume + * names are only unique within a namespace. + */ + "volumeName"?: string; + /** + * 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 override the default behaviour. + * Set to "default" if you are not using namespaces within StorageOS. + * Namespaces that do not pre-exist within StorageOS will be created. + */ + "volumeNamespace"?: string; + }; + /** + * vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine. + * Deprecated: VsphereVolume is deprecated. All operations for the in-tree vsphereVolume type + * are redirected to the csi.vsphere.vmware.com CSI driver. + */ + "vsphereVolume"?: { + /** + * 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. + */ + "fsType"?: string; + /** + * storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName. + */ + "storagePolicyID"?: string; + /** + * storagePolicyName is the storage Policy Based Management (SPBM) profile name. + */ + "storagePolicyName"?: string; + /** + * volumePath is the path that identifies vSphere volume vmdk + */ + "volumePath": string; + }; + }>; + }; + }; + "version": string; + }; + }>; + }; + }>; + "suspended"?: boolean; + }; + "status"?: { + "conditions"?: Array<{ + /** + * lastTransitionTime is the last time the condition transitioned from one status to another. + * This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + */ + "lastTransitionTime": string; + /** + * message is a human readable message indicating details about the transition. + * This may be an empty string. + */ + "message": string; + /** + * observedGeneration represents the .metadata.generation that the condition was set based upon. + * For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + * with respect to the current state of the instance. + */ + "observedGeneration"?: number; + /** + * reason contains a programmatic identifier indicating the reason for the condition's last transition. + * Producers of specific condition types may define expected values and meanings for this field, + * and whether the values are considered a guaranteed API. + * The value should be a CamelCase string. + * This field may not be empty. + */ + "reason": string; + /** + * status of the condition, one of True, False, Unknown. + */ + "status": "True" | "False" | "Unknown"; + /** + * type of condition in CamelCase or in foo.example.com/CamelCase. + */ + "type": string; + }>; + "endTime"?: string; + "jobs"?: Array<{ + "message"?: string; + "name"?: string; + /** + * JobPhase 是 Job 的聚合生命周期阶段,由控制面 Job 控制器根据其 Task 的 + * 观测状态推导得出。取值集合必须与 Job 状态机保持一致。 + */ + "phase"?: "Pending" | "Running" | "Succeeded" | "Failed" | "Stopped"; + }>; + /** + * ObservedGeneration 是 Workflow 控制器最近一次完成调谐时所观测到的 + * metadata.generation。它是控制器契约而非 API Server 保证:消费者在读取 + * phase / conditions 之前,应比较本字段与 metadata.generation 以识别过期状态。 + */ + "observedGeneration"?: number; + "phase"?: "Pending" | "Running" | "Stopping" | "Stopped" | "Succeeded" | "Failed"; + "startTime"?: string; + }; +} + +export class Workflow extends Model implements IWorkflow { + "apiVersion": IWorkflow["apiVersion"]; + "kind": IWorkflow["kind"]; + "metadata"?: IWorkflow["metadata"]; + "spec"?: IWorkflow["spec"]; + "status"?: IWorkflow["status"]; + +static apiVersion: IWorkflow["apiVersion"] = "rlinf.io/v1alpha1"; +static kind: IWorkflow["kind"] = "Workflow"; +static is = createTypeMetaGuard(Workflow); + +constructor(data?: ModelData) { + super(); + + this.setDefinedProps({ + apiVersion: Workflow.apiVersion, + kind: Workflow.kind, + ...data + } as IWorkflow); +} +} + + +setValidateFunc(Workflow, validate as ValidateFunc); diff --git a/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/index.ts b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/index.ts new file mode 100644 index 0000000..a33dc23 --- /dev/null +++ b/apps/rlark-ui/src/generated/rlark/rlinf.io/v1alpha1/index.ts @@ -0,0 +1,11 @@ +// Code generated from api/config/crd/bases. DO NOT EDIT. + +export * from "./Addon.js"; +export * from "./Cluster.js"; +export * from "./DomainPeer.js"; +export * from "./Domain.js"; +export * from "./Job.js"; +export * from "./Node.js"; +export * from "./Pod.js"; +export * from "./Task.js"; +export * from "./Workflow.js"; diff --git a/apps/rlark-ui/src/mockBackend.ts b/apps/rlark-ui/src/mockBackend.ts index 61f23d4..0d1689e 100644 --- a/apps/rlark-ui/src/mockBackend.ts +++ b/apps/rlark-ui/src/mockBackend.ts @@ -3,7 +3,8 @@ import { storageClasses as mockStorageClasses, type StorageClass, } from "./data"; -import type { CRDDomain, CRDJob, CRDWorkflow, NodeEventEntry } from "./types"; +import type { CRDDomain, NodeEventEntry } from "./types"; +import type { CRDJob, CRDWorkflow } from "./crdModels"; import { buildMockCRDNodes } from "./utils/nodes"; const nodes = buildMockCRDNodes(); @@ -30,47 +31,52 @@ const makeTask = ( ) => ({ name, head: role === "actor", - agentType: "Kubernetes", role, - nodeSelector: { "rlark.io/cluster-id": cluster }, - runScript: `python -m rlark.${role}`, - tensorBoardDir: role === "actor" ? "/logs/tensorboard" : undefined, - kubernetes: { - workload: { - kind: "Deployment", - replicas: 1, - template: { - spec: { - containers: [ - { - name, - image, - env: [{ name: "RLARK_TASK_ROLE", value: role }], - volumeMounts: [ - { name: "data", mountPath: "/data" }, - { name: "local-cache", mountPath: "/cache" }, - ], - resources: { - requests: { cpu: "4", memory: "8Gi", "nvidia.com/gpu": "1" }, - }, + placement: { nodeSelector: { "rlark.io/cluster-id": cluster } }, + runtime: { kind: "Kubernetes" }, + workload: { + kind: "rlinf.io/ray", + version: "v1", + parameters: { + role: role === "actor" ? "head" : "worker", + run: role === "actor" ? { inline: `python -m rlark.${role}` } : undefined, + }, + carrier: { + type: "rlinf.io/kubernetes-deployment", + version: "v1", + parameters: { replicas: 1 }, + }, + template: { + spec: { + containers: [ + { + name: "main", + image, + env: [{ name: "RLARK_TASK_ROLE", value: role }], + volumeMounts: [ + { name: "data", mountPath: "/data" }, + { name: "local-cache", mountPath: "/cache" }, + ], + resources: { + requests: { cpu: "4", memory: "8Gi", "nvidia.com/gpu": "1" }, }, - ], - volumes: [ - { - name: "data", - ephemeral: { - volumeClaimTemplate: { - spec: { - accessModes: ["ReadWriteOnce"], - storageClassName: "training-datasets", - resources: { requests: { storage: "50Gi" } }, - }, + }, + ], + volumes: [ + { + name: "data", + ephemeral: { + volumeClaimTemplate: { + spec: { + accessModes: ["ReadWriteOnce"], + storageClassName: "training-datasets", + resources: { requests: { storage: "50Gi" } }, }, }, }, - { name: "local-cache", hostPath: { path: "/var/lib/rlark/cache" } }, - ], - }, + }, + { name: "local-cache", hostPath: { path: "/var/lib/rlark/cache" } }, + ], }, }, }, @@ -148,20 +154,16 @@ const jobs: CRDJob[] = [ ], }, status: { - phase: String(phase), + phase: phase as "Pending" | "Running" | "Succeeded", tasks: taskNames.map((taskName, taskIndex) => ({ name: taskName, phase: phase === "Succeeded" ? "Succeeded" : taskIndex === 0 - ? String(phase) + ? (phase as "Pending" | "Running" | "Succeeded") : "Pending", message: "Mock data generated from the shared topology", - observedNodes: [ - nodes.filter((node) => node.metadata.namespace === cluster)[taskIndex] - ?.metadata.name, - ].filter(Boolean) as string[], })), }, }; @@ -169,9 +171,14 @@ const jobs: CRDJob[] = [ const pods = jobs.flatMap((job, jobIndex) => (job.status?.tasks ?? []).map((task, taskIndex) => { - const podName = `${job.metadata.name}-${task.name}-${taskIndex}`; - const domain = job.spec.domain ?? ""; - const node = task.observedNodes?.[0] ?? ""; + const podName = `${job.metadata?.name ?? ""}-${task.name ?? ""}-${taskIndex}`; + const domain = job.spec?.domain ?? ""; + const node = + nodes.filter( + (item) => + item.metadata.namespace === + clusterNames[jobIndex % clusterNames.length], + )[taskIndex]?.metadata.name ?? ""; return { apiVersion: "rlinf.io/v1alpha1", kind: "Pod", @@ -258,7 +265,7 @@ domains.forEach((domain) => { .map((pod) => ({ ip: pod.status.ip, job: pod.metadata.name.split("-").slice(0, -3).join("-"), - task: pod.spec.taskName, + task: pod.spec.taskName ?? "", pod: pod.spec.podName, })), }; @@ -274,8 +281,8 @@ const workflows: CRDWorkflow[] = [ }, spec: { jobTemplates: jobs.map((job, index) => ({ - name: job.metadata.name, - dependencies: index === 0 ? [] : [jobs[index - 1].metadata.name], + name: job.metadata?.name, + dependencies: index === 0 ? [] : [jobs[index - 1].metadata?.name ?? ""], spec: job.spec, })), }, @@ -283,7 +290,7 @@ const workflows: CRDWorkflow[] = [ phase: "Running", startTime: "2026-08-05T08:30:00Z", jobs: jobs.map((job) => ({ - name: job.metadata.name, + name: job.metadata?.name, phase: job.status?.phase ?? "Pending", message: "", })), @@ -350,7 +357,7 @@ export function installMockBackend() { nodes: nodes.filter((node) => node.metadata.namespace === id), }, }) - : json({ error: "not found" }, 404); + : json({ code: "RESOURCE_NOT_FOUND", message: "not found" }, 404); } if (method === "GET" && path === "/api/v1/rlinf.io/v1alpha1/nodes") return json({ items: nodes }); @@ -391,12 +398,12 @@ export function installMockBackend() { !path.endsWith("/logs") ) { const name = decodeURIComponent(path.split("/").pop()!); - const job = jobs.find((item) => item.metadata.name === name); + const job = jobs.find((item) => item.metadata?.name === name); if (!job) return json({ error: "not found" }, 404); const patch = await request.json(); - if (typeof patch.spec?.stopped === "boolean") { - job.spec.stopped = patch.spec.stopped; - if (patch.spec.stopped) { + if (typeof patch.spec?.suspended === "boolean") { + if (job.spec) job.spec.suspended = patch.spec.suspended; + if (patch.spec.suspended) { job.status = { ...job.status, phase: "Stopped" }; } else { job.status = { @@ -410,6 +417,7 @@ export function installMockBackend() { } } if (patch.metadata?.annotations) { + job.metadata ??= {}; job.metadata.annotations = { ...job.metadata.annotations, ...patch.metadata.annotations, @@ -422,7 +430,7 @@ export function installMockBackend() { path.startsWith("/api/v1/rlinf.io/v1alpha1/jobs/") ) { const name = decodeURIComponent(path.split("/").pop()!); - const index = jobs.findIndex((item) => item.metadata.name === name); + const index = jobs.findIndex((item) => item.metadata?.name === name); if (index >= 0) jobs.splice(index, 1); return json({ success: true }); } @@ -449,7 +457,7 @@ export function installMockBackend() { .get("labelSelector") ?.match(/rlinf\.io\/job=([^,]+)/)?.[1]; const selectedJobs = selectedJob - ? jobs.filter((job) => job.metadata.name === selectedJob) + ? jobs.filter((job) => job.metadata?.name === selectedJob) : jobs; return json({ items: selectedJobs.flatMap((job) => @@ -457,8 +465,8 @@ export function installMockBackend() { apiVersion: "rlinf.io/v1alpha1", kind: "Task", metadata: { - name: `${job.metadata.name}-${task.name}`, - labels: { "rlinf.io/job": job.metadata.name }, + name: `${job.metadata?.name ?? ""}-${task.name ?? ""}`, + labels: { "rlinf.io/job": job.metadata?.name ?? "" }, }, status: { ...task }, })), @@ -470,12 +478,14 @@ export function installMockBackend() { url.searchParams.get("labelSelector") ?? "", ); const selectedJob = jobs.find((job) => - selector.includes(`${job.metadata.name}-`), + selector.includes(`${job.metadata?.name ?? ""}-`), ); return json({ items: selectedJob ? pods.filter((pod) => - pod.metadata.name.startsWith(`${selectedJob.metadata.name}-`), + pod.metadata.name.startsWith( + `${selectedJob.metadata?.name ?? ""}-`, + ), ) : pods, }); @@ -497,14 +507,14 @@ export function installMockBackend() { path.startsWith("/api/v1/rlinf.io/v1alpha1/workflows/") ) { const name = decodeURIComponent(path.split("/").pop()!); - const workflow = workflows.find((item) => item.metadata.name === name); + const workflow = workflows.find((item) => item.metadata?.name === name); if (!workflow) return json({ error: "not found" }, 404); const patch = await request.json(); - if (typeof patch.spec?.stopped === "boolean") { - workflow.spec.stopped = patch.spec.stopped; + if (typeof patch.spec?.suspended === "boolean") { + if (workflow.spec) workflow.spec.suspended = patch.spec.suspended; workflow.status = { ...workflow.status, - phase: patch.spec.stopped ? "Stopping" : "Running", + phase: patch.spec.suspended ? "Stopping" : "Running", }; } return json(workflow); @@ -521,7 +531,11 @@ export function installMockBackend() { const pathName = method === "PUT" ? decodeURIComponent(path.split("/").pop() || "") : ""; const name = payload.name || pathName; - if (!name) return json({ error: "name is required" }, 400); + if (!name) + return json( + { code: "INVALID_REQUEST_BODY", message: "name is required" }, + 400, + ); const next: StorageClass = { id: name, name, @@ -573,7 +587,8 @@ export function installMockBackend() { if (path.startsWith("/api/v1/image-registries/")) { const id = decodeURIComponent(path.split("/").pop() || ""); const index = imageRegistries.findIndex((item) => item.id === id); - if (index < 0) return json({ error: "not found" }, 404); + if (index < 0) + return json({ code: "RESOURCE_NOT_FOUND", message: "not found" }, 404); if (method === "GET") return json(imageRegistries[index]); if (method === "PUT") { const payload = await request.json(); @@ -598,9 +613,21 @@ export function installMockBackend() { if (method === "POST" && path === "/api/v1/ssh-user-keys") { const payload = await request.json(); if (sshUserKeys.some((item) => item.user === payload.user)) - return json({ error: "public key name already exists" }, 409); + return json( + { + code: "RESOURCE_ALREADY_EXISTS", + message: "public key name already exists", + }, + 409, + ); if (sshUserKeys.some((item) => item.public_key === payload.public_key)) - return json({ error: "public key already exists" }, 409); + return json( + { + code: "RESOURCE_ALREADY_EXISTS", + message: "public key already exists", + }, + 409, + ); sshUserKeys.push({ index: sshUserKeys.length, user: payload.user, diff --git a/apps/rlark-ui/src/pages/ClusterManagement.tsx b/apps/rlark-ui/src/pages/ClusterManagement.tsx index 98ec8f0..f2cb8fb 100644 --- a/apps/rlark-ui/src/pages/ClusterManagement.tsx +++ b/apps/rlark-ui/src/pages/ClusterManagement.tsx @@ -92,7 +92,7 @@ function aggregateClusters( ? "Offline" : onlineNodes === totalNodes ? "Online" - : "Degraded"; + : "Downgraded"; const models = (category: NodeCategory) => [ ...new Set( clusterNodes @@ -160,7 +160,7 @@ function normalizeClusterSummary( return { ...cluster, type: nodeAggregate?.type ?? cluster.type, - phase: nodeAggregate?.phase ?? cluster.phase, + phase: cluster.phase, totalNodes, onlineNodes, offlineNodes, @@ -177,21 +177,18 @@ function normalizeClusterSummary( } function ClusterStatus({ phase, zh }: { phase: string; zh: boolean }) { - const label = - phase === "Online" - ? zh - ? "在线" - : "Online" - : phase === "Degraded" - ? zh - ? "部分离线" - : "Degraded" - : zh - ? "离线" - : "Offline"; + const labels: Record = { + Online: { zh: "在线", en: "Online" }, + Offline: { zh: "离线", en: "Offline" }, + Downgraded: { zh: "服务降级", en: "Downgraded" }, + Cordoned: { zh: "停用调度", en: "Cordoned" }, + Draining: { zh: "排空中", en: "Draining" }, + Deleted: { zh: "已删除", en: "Deleted" }, + }; + const label = labels[phase] ?? { zh: phase, en: phase }; return ( - {label} + {zh ? label.zh : label.en} ); } @@ -226,9 +223,7 @@ export function ClusterManagementPage({ let resolvedNodes: CRDNode[] = []; try { resolvedNodes = await nodesApi.list({ - labelSelector: selectedClusterID - ? `rlark.io/cluster-id=${selectedClusterID}` - : undefined, + labelSelector: undefined, }); } catch { resolvedNodes = []; @@ -257,13 +252,13 @@ export function ClusterManagementPage({ } catch { resolvedClusters = []; } - if (resolvedClusters.length === 0) { - resolvedClusters = aggregateClusters( - resolvedNodes, - new Map(), - workerOnly, - ); - } + const existingClusterIDs = new Set( + resolvedClusters.map((cluster) => cluster.id || cluster.name), + ); + resolvedNodes = resolvedNodes.filter((node) => + existingClusterIDs.has(clusterIDForNode(node)), + ); + const visibleClusterIDs = new Set(existingClusterIDs); if (selectedClusterID) { try { @@ -299,6 +294,7 @@ export function ClusterManagementPage({ if (!resolvedClusters.some((cluster) => cluster.id === detail.id)) { resolvedClusters = [detail, ...resolvedClusters]; } + visibleClusterIDs.add(detail.id || detail.name); } catch { setDetailNodes( resolvedNodes.filter( @@ -309,6 +305,9 @@ export function ClusterManagementPage({ } else { setDetailNodes([]); } + resolvedClusters = resolvedClusters.filter((cluster) => + visibleClusterIDs.has(cluster.id || cluster.name), + ); setClusters(resolvedClusters); setLoading(false); }; @@ -350,9 +349,7 @@ export function ClusterManagementPage({ : undefined; if (selectedClusterID && selectedCluster) { - const visibleDetailNodes = workerOnly - ? detailNodes.filter(isBusinessWorkerNode) - : detailNodes; + const visibleDetailNodes = detailNodes; const onlineRate = selectedCluster.totalNodes ? Math.round( (selectedCluster.onlineNodes / selectedCluster.totalNodes) * 100, @@ -558,8 +555,11 @@ export function ClusterManagementPage({ label={zh ? "状态" : "Status"} options={[ { value: "Online", label: zh ? "在线" : "Online" }, - { value: "Degraded", label: zh ? "部分离线" : "Degraded" }, + { value: "Downgraded", label: zh ? "服务降级" : "Downgraded" }, + { value: "Cordoned", label: zh ? "停用调度" : "Cordoned" }, + { value: "Draining", label: zh ? "排空中" : "Draining" }, { value: "Offline", label: zh ? "离线" : "Offline" }, + { value: "Deleted", label: zh ? "已删除" : "Deleted" }, ]} selected={phaseFilterValues} onChange={setPhaseFilterValues} diff --git a/apps/rlark-ui/src/pages/Clusters.tsx b/apps/rlark-ui/src/pages/Clusters.tsx index 2a4463d..7f31f78 100644 --- a/apps/rlark-ui/src/pages/Clusters.tsx +++ b/apps/rlark-ui/src/pages/Clusters.tsx @@ -29,6 +29,7 @@ import { import type { Phase } from "../data"; import type { Copy } from "../i18n"; import type { CRDNode } from "../types"; +import type { CRDTask } from "../crdModels"; import { useAutoRefresh } from "../hooks"; import { categoryLabels, @@ -67,15 +68,15 @@ type NodeWorker = { domain: string; ip: string; phase: string; - requests: Record; + requests: Record; }; function addRequestedResource( totals: Record, key: string, - raw?: string, + raw?: string | number, ) { - const value = parseResourceQuantity(key, raw); + const value = parseResourceQuantity(key, String(raw ?? "")); if (value !== null) totals[key] = (totals[key] ?? 0) + value; } @@ -475,7 +476,9 @@ export function ClusterDetailReal({ {zh ? "节点名称" : "Name"} {zh ? "类型" : "Type"} - {zh ? "状态" : "Phase"} + {zh ? "接入状态" : "Connection"} + {zh ? "上次心跳" : "Last heartbeat"} + {zh ? "状态变化时间" : "Status changed"} {zh ? "物理位置" : "Location"} {zh ? "节点 IP" : "Node IP"} {zh ? "资源与空闲" : "Resources"} @@ -507,6 +510,20 @@ export function ClusterDetailReal({ copy={c} /> + + + {node.status?.lastHeartbeatTime + ? formatChinaDateTime(node.status.lastHeartbeatTime) + : "—"} + + + + + {node.status?.lastStatusChangeTime + ? formatChinaDateTime(node.status.lastStatusChangeTime) + : "—"} + + {getNodeLocation(node) || "—"} @@ -574,11 +591,8 @@ export function NodeDetailReal({ tasksApi.list(), podsApi.list(), ]); - const tasks = new Map>( - (taskItems as unknown as Record[]).map((task) => [ - (task as { metadata?: { name?: string } }).metadata?.name ?? "", - task, - ]), + const tasks = new Map( + taskItems.map((task) => [task.metadata?.name ?? "", task]), ); const workers: NodeWorker[] = (podItems as Record[]) .filter( @@ -591,27 +605,7 @@ export function NodeDetailReal({ spec?: { taskName?: string; podName?: string; domain?: string }; status?: { phase?: string; ip?: string }; }) => { - const task = tasks.get(pod.spec?.taskName ?? "") as - | { - metadata?: { labels?: Record }; - spec?: { - role?: string; - kubernetes?: { - workload?: { - template?: { - spec?: { - containers?: Array<{ - resources?: { - requests?: Record; - }; - }>; - }; - }; - }; - }; - }; - } - | undefined; + const task = tasks.get(pod.spec?.taskName ?? ""); const job = task?.metadata?.labels?.["rlinf.io/job"]; if (!job) return null; return { @@ -626,8 +620,9 @@ export function NodeDetailReal({ ip: pod.status?.ip ?? "—", phase: pod.status?.phase ?? "Pending", requests: - task?.spec?.kubernetes?.workload?.template?.spec - ?.containers?.[0]?.resources?.requests ?? {}, + task?.spec?.workload.template?.spec?.containers?.find( + (container) => container.name === "main", + )?.resources?.requests ?? {}, }; }, ) @@ -1196,7 +1191,7 @@ function NodeWorkerTable({ Object.entries(worker.requests) .filter( ([key, value]) => - Number.parseFloat(value) > 0 && + Number.parseFloat(String(value)) > 0 && (/(^|[./-])gpu($|[./-])/i.test(key) || key === "rlinf.io/device" || key.startsWith("rlinf.io/device-")), diff --git a/apps/rlark-ui/src/pages/CreateJob.tsx b/apps/rlark-ui/src/pages/CreateJob.tsx index 64584e4..4bc0b32 100644 --- a/apps/rlark-ui/src/pages/CreateJob.tsx +++ b/apps/rlark-ui/src/pages/CreateJob.tsx @@ -104,18 +104,21 @@ function ClusterSelect({ : zh ? "云算力集群" : "Cloud compute"; - const statusLabel = (cluster: Cluster) => - cluster.phase === "Online" - ? zh - ? "运行正常" - : "Online" - : cluster.phase === "Offline" - ? zh - ? "离线" - : "Offline" - : zh - ? "部分异常" - : "Degraded"; + const statusLabel = (cluster: Cluster) => { + const labels: Record = { + Online: { zh: "运行正常", en: "Online" }, + Offline: { zh: "离线", en: "Offline" }, + Downgraded: { zh: "服务降级", en: "Downgraded" }, + Cordoned: { zh: "停用调度", en: "Cordoned" }, + Draining: { zh: "排空中", en: "Draining" }, + Deleted: { zh: "已删除", en: "Deleted" }, + }; + const label = labels[cluster.phase] ?? { + zh: cluster.phase, + en: cluster.phase, + }; + return zh ? label.zh : label.en; + }; const optionContent = (cluster: Cluster) => ( <> @@ -400,15 +403,29 @@ export function CreateJobModal({ setStorageClassFetched(false); try { const data = await storageClassesApi.list<{ + id: string; name: string; description?: string; bucket?: string; - }>(cluster); - const storageClassList = Object.values(data).map((sc) => ({ - name: sc.name, - description: sc.description || "", - bucket: sc.bucket || "", - })); + clusters?: string[]; + }>(); + const selectedCluster = availableClusters.find( + (item) => item.id === cluster || item.name === cluster, + ); + const clusterIDs = new Set( + [cluster, selectedCluster?.id, selectedCluster?.name].filter( + (item): item is string => Boolean(item), + ), + ); + const storageClassList = Object.values(data) + .filter( + (sc) => !cluster || sc.clusters?.some((item) => clusterIDs.has(item)), + ) + .map((sc) => ({ + name: sc.name, + description: sc.description || "", + bucket: sc.bucket || "", + })); setStorageClasses(storageClassList); } catch (e) { console.warn("Failed to fetch storage classes:", e); @@ -604,7 +621,7 @@ export function CreateJobModal({ if (hasStorageMount && rr.cluster) { fetchStorageClasses(rr.cluster); } - }, [activeRoleTab, roleResources]); + }, [activeRoleTab, roleResources, availableClusters]); const onTypeChange = (next: JobType) => { setType(next); @@ -961,11 +978,11 @@ export function CreateJobModal({ metadata: { ...crd.metadata, annotations: { - ...crd.metadata.annotations, + ...crd.metadata?.annotations, "rlark.io/restarted-at": new Date().toISOString(), }, }, - spec: { ...crd.spec, stopped: false }, + spec: { ...crd.spec, suspended: false }, } : crd; if (isEdit) { @@ -978,7 +995,7 @@ export function CreateJobModal({ name: editJob!.name, annotations: { ...current.metadata?.annotations, - ...requestBody.metadata.annotations, + ...requestBody.metadata?.annotations, }, }, } as typeof requestBody; diff --git a/apps/rlark-ui/src/pages/Jobs.tsx b/apps/rlark-ui/src/pages/Jobs.tsx index 891883c..dc90e9c 100644 --- a/apps/rlark-ui/src/pages/Jobs.tsx +++ b/apps/rlark-ui/src/pages/Jobs.tsx @@ -40,7 +40,8 @@ import { type Worker as WorkerItem, } from "../data"; import type { Copy as CopyType } from "../i18n"; -import type { CRDNode, CRDTask, NodeEventEntry } from "../types"; +import type { CRDNode, NodeEventEntry } from "../types"; +import type { CRDTask } from "../crdModels"; import { useAutoRefresh } from "../hooks"; import { crdToJob } from "../utils/crd"; import { effectiveJobPhase, type JobDisplayPhase } from "../utils/jobPhase"; @@ -276,11 +277,18 @@ export function JobsPage({ setAllJobTags(tags); const nodeNames = new Set(); - for (const job of items) { - for (const task of job.status?.tasks ?? []) { - for (const nodeName of task.observedNodes ?? []) { - if (nodeName) nodeNames.add(nodeName); - } + const taskResponses = await Promise.all( + items.map(async (job) => { + const jobName = job.metadata?.name; + if (!jobName) return []; + return tasksApi + .list({ labelSelector: `rlinf.io/job=${jobName}` }) + .catch(() => []); + }), + ); + for (const task of taskResponses.flat()) { + for (const nodeName of task.status?.observedNodes ?? []) { + if (nodeName) nodeNames.add(nodeName); } } @@ -416,7 +424,7 @@ export function JobsPage({ "rlark.io/restarted-at": new Date().toISOString(), }, }, - spec: { stopped: false }, + spec: { suspended: false }, }); setRealJobs((prev) => prev.map((item) => diff --git a/apps/rlark-ui/src/pages/SSHKeys.tsx b/apps/rlark-ui/src/pages/SSHKeys.tsx index 7c20c36..f304b14 100644 --- a/apps/rlark-ui/src/pages/SSHKeys.tsx +++ b/apps/rlark-ui/src/pages/SSHKeys.tsx @@ -111,9 +111,8 @@ export function SSHKeysPage({ await sshKeysApi.create(newUser.trim(), newKey.trim()); } catch (error) { if (error instanceof ApiError && error.status === 409) { - const data = error.body as { error?: string }; setError( - data.error === "public key name already exists" + errorMessage(error.body) === "public key name already exists" ? zh ? "公钥名称已存在,请使用其他名称。" : "The public key name already exists. Use another name." @@ -558,5 +557,5 @@ export function SSHKeysPage({ ); } -import { ApiError } from "../api"; +import { ApiError, errorMessage } from "../api"; import { sshKeysApi, systemConfigApi, type SSHKeyItem } from "../backend"; diff --git a/apps/rlark-ui/src/pages/Storage.tsx b/apps/rlark-ui/src/pages/Storage.tsx index 8eb7fc1..6513df4 100644 --- a/apps/rlark-ui/src/pages/Storage.tsx +++ b/apps/rlark-ui/src/pages/Storage.tsx @@ -129,7 +129,7 @@ export function StorageClassesPage({ const [editingClass, setEditingClass] = useState(null); const selected = useMemo( - () => realClasses.find((sc) => sc.name === selectedName), + () => realClasses.find((sc) => sc.id === selectedName), [realClasses, selectedName], ); @@ -138,9 +138,9 @@ export function StorageClassesPage({ setLoading(true); try { const data = await storageClassesApi.list(); - const list: StorageClass[] = Object.values(data).map( - normalizeStorageClass, - ); + const list: StorageClass[] = Object.values( + data as Record, + ).map(normalizeStorageClass); setRealClasses(list); } catch { setRealClasses([]); @@ -334,7 +334,7 @@ export function StorageClassesPage({