├── .dockerignore ├── .github ├── ISSUE_TEMPLATE │ ├── bug_request.md │ ├── feature_request.md │ └── new-release.md ├── PULL_REQUEST_TEMPLATE.md └── dependabot.yml ├── .gitignore ├── .golangci.yaml ├── CHANGELOG └── README.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── OWNERS ├── PROJECT ├── README.md ├── RELEASE.md ├── SECURITY.md ├── SECURITY_CONTACTS ├── api ├── config │ └── v1alpha1 │ │ ├── configuration_types.go │ │ ├── defaults.go │ │ ├── defaults_test.go │ │ ├── groupversion_info.go │ │ ├── zz_generated.deepcopy.go │ │ └── zz_generated.defaults.go └── jobset │ └── v1alpha2 │ ├── doc.go │ ├── groupversion_info.go │ ├── jobset_types.go │ ├── openapi_generated.go │ ├── types.go │ └── zz_generated.deepcopy.go ├── charts └── jobset │ ├── .helmignore │ ├── Chart.yaml │ ├── README.md │ ├── README.md.gotmpl │ ├── crds │ └── jobset.x-k8s.io_jobsets.yaml │ ├── templates │ ├── NOTES.txt │ ├── _helpers.tpl │ ├── certmanager │ │ ├── _helpers.tpl │ │ ├── certificate.yaml │ │ ├── certificate_metrics.yaml │ │ └── issuer.yaml │ ├── controller │ │ ├── _helpers.tpl │ │ ├── cluster_role.yaml │ │ ├── cluster_role_binding.yaml │ │ ├── configmap.yaml │ │ ├── deployment.yaml │ │ ├── role.yaml │ │ ├── role_binding.yaml │ │ └── service_account.yaml │ ├── prometheus │ │ ├── _helpers.tpl │ │ ├── role.yaml │ │ ├── role_binding.yaml │ │ ├── service.yaml │ │ └── service_monitor.yaml │ └── webhook │ │ ├── _helpers.tpl │ │ ├── mutating_webhook_configuration.yaml │ │ ├── secret.yaml │ │ ├── service.yaml │ │ └── validating_webhook_configuration.yaml │ ├── tests │ ├── certmanager │ │ ├── certificate_test.yaml │ │ └── issuer_test.yaml │ ├── controller │ │ └── deployment_test.yaml │ ├── prometheus │ │ ├── service_monitor_test.yaml │ │ └── service_test.yaml │ └── webhook │ │ └── secret_test.yaml │ └── values.yaml ├── client-go ├── applyconfiguration │ ├── internal │ │ └── internal.go │ ├── jobset │ │ └── v1alpha2 │ │ │ ├── coordinator.go │ │ │ ├── dependson.go │ │ │ ├── failurepolicy.go │ │ │ ├── failurepolicyrule.go │ │ │ ├── jobset.go │ │ │ ├── jobsetspec.go │ │ │ ├── jobsetstatus.go │ │ │ ├── network.go │ │ │ ├── replicatedjob.go │ │ │ ├── replicatedjobstatus.go │ │ │ ├── startuppolicy.go │ │ │ └── successpolicy.go │ └── utils.go ├── clientset │ └── versioned │ │ ├── clientset.go │ │ ├── fake │ │ ├── clientset_generated.go │ │ ├── doc.go │ │ └── register.go │ │ ├── scheme │ │ ├── doc.go │ │ └── register.go │ │ └── typed │ │ └── jobset │ │ └── v1alpha2 │ │ ├── doc.go │ │ ├── fake │ │ ├── doc.go │ │ ├── fake_jobset.go │ │ └── fake_jobset_client.go │ │ ├── generated_expansion.go │ │ ├── jobset.go │ │ └── jobset_client.go ├── informers │ └── externalversions │ │ ├── factory.go │ │ ├── generic.go │ │ ├── internalinterfaces │ │ └── factory_interfaces.go │ │ └── jobset │ │ ├── interface.go │ │ └── v1alpha2 │ │ ├── interface.go │ │ └── jobset.go └── listers │ └── jobset │ └── v1alpha2 │ ├── expansion_generated.go │ └── jobset.go ├── cloudbuild.yaml ├── code-of-conduct.md ├── config ├── components │ ├── certmanager │ │ ├── certificate.yaml │ │ ├── certificate_metrics.yaml │ │ ├── kustomization.yaml │ │ └── kustomizeconfig.yaml │ ├── crd │ │ ├── bases │ │ │ └── jobset.x-k8s.io_jobsets.yaml │ │ ├── kustomization.yaml │ │ ├── kustomizeconfig.yaml │ │ └── patches │ │ │ ├── cainjection_in_jobsets.yaml │ │ │ └── webhook_in_jobsets.yaml │ ├── internalcert │ │ ├── kustomization.yaml │ │ └── secret.yaml │ ├── manager │ │ ├── controller_manager_config.yaml │ │ ├── kustomization.yaml │ │ └── manager.yaml │ ├── prometheus │ │ ├── kustomization.yaml │ │ ├── monitor.yaml │ │ ├── monitor_tls_patch.yaml │ │ └── role.yaml │ ├── rbac │ │ ├── auth_proxy_client_binding.yaml │ │ ├── auth_proxy_client_clusterrole.yaml │ │ ├── auth_proxy_role.yaml │ │ ├── auth_proxy_role_binding.yaml │ │ ├── jobset_editor_role.yaml │ │ ├── jobset_viewer_role.yaml │ │ ├── kustomization.yaml │ │ ├── leader_election_role.yaml │ │ ├── leader_election_role_binding.yaml │ │ ├── role.yaml │ │ ├── role_binding.yaml │ │ └── service_account.yaml │ └── webhook │ │ ├── kustomization.yaml │ │ ├── kustomizeconfig.yaml │ │ ├── manifests.yaml │ │ ├── patches │ │ ├── mutating-patch.yaml │ │ └── validating-patch.yaml │ │ └── service.yaml ├── default │ ├── certmanager_metrics_manager_patch.yaml │ ├── kustomization.yaml │ ├── manager_config_patch.yaml │ ├── manager_metrics_patch.yaml │ ├── manager_metrics_service.yaml │ ├── manager_webhook_patch.yaml │ └── webhookcainjection_patch.yaml ├── prometheus │ └── kustomization.yaml └── samples │ ├── batch_v1alpha2_jobset.yaml │ └── jobset_v1alpha1_configuration.yaml ├── docs └── README.md ├── examples ├── go.mod ├── go.sum ├── hack ├── .notableofcontents ├── boilerplate.go.txt ├── cherry_pick_pull.sh ├── e2e-test.sh ├── genref │ ├── config.yaml │ └── markdown │ │ ├── members.tpl │ │ ├── pkg.tpl │ │ └── type.tpl ├── label_nodes │ ├── label_nodes.py │ └── requirements.txt ├── push-chart.sh ├── python-sdk │ ├── gen-sdk.sh │ ├── post_gen.py │ ├── swagger.json │ ├── swagger_config.json │ └── test-sdk.sh ├── swagger │ └── main.go ├── update-codegen.sh ├── update-toc.sh └── verify-toc.sh ├── keps ├── 104-StartupPolicy │ ├── README.md │ └── kep.yaml ├── 262-ConfigurableFailurePolicy │ ├── README.md │ └── kep.yaml ├── 672-serial-job-execution │ ├── README.md │ ├── jobset-serial-execution.png │ └── kep.yaml └── NNNN-template │ ├── README.md │ └── kep.yaml ├── main.go ├── netlify.toml ├── pkg ├── config │ ├── config.go │ ├── config_test.go │ ├── validation.go │ └── validation_test.go ├── constants │ └── constants.go ├── controllers │ ├── depends_on.go │ ├── depends_on_test.go │ ├── failure_policy.go │ ├── failure_policy_test.go │ ├── jobset_controller.go │ ├── jobset_controller_test.go │ ├── pod_controller.go │ ├── pod_controller_test.go │ ├── startup_policy.go │ ├── startup_policy_test.go │ ├── success_policy.go │ ├── success_policy_test.go │ ├── ttl_after_finished.go │ └── ttl_after_finished_test.go ├── features │ └── features.go ├── metrics │ ├── metrics.go │ └── metrics_test.go ├── util │ ├── cert │ │ └── cert.go │ ├── collections │ │ ├── collections.go │ │ └── collections_test.go │ ├── placement │ │ └── placement.go │ ├── testing │ │ └── wrappers.go │ └── useragent │ │ ├── useragent.go │ │ └── useragent_test.go ├── version │ └── version.go └── webhooks │ ├── jobset_webhook.go │ ├── jobset_webhook_test.go │ ├── pod_admission_webhook.go │ ├── pod_admission_webhook_test.go │ └── pod_mutating_webhook.go ├── sdk └── python │ ├── .gitignore │ ├── .gitlab-ci.yml │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ ├── FILES │ └── VERSION │ ├── .travis.yml │ ├── Dockerfile │ ├── README.md │ ├── examples │ ├── README.md │ └── create_jobset.py │ ├── git_push.sh │ ├── jobset │ ├── __init__.py │ ├── api │ │ └── __init__.py │ ├── api_client.py │ ├── api_response.py │ ├── configuration.py │ ├── exceptions.py │ ├── models │ │ ├── __init__.py │ │ ├── io_k8s_api_batch_v1_job_spec.py │ │ ├── io_k8s_api_batch_v1_job_template_spec.py │ │ ├── io_k8s_api_batch_v1_pod_failure_policy.py │ │ ├── io_k8s_api_batch_v1_pod_failure_policy_on_exit_codes_requirement.py │ │ ├── io_k8s_api_batch_v1_pod_failure_policy_on_pod_conditions_pattern.py │ │ ├── io_k8s_api_batch_v1_pod_failure_policy_rule.py │ │ ├── io_k8s_api_batch_v1_success_policy.py │ │ ├── io_k8s_api_batch_v1_success_policy_rule.py │ │ ├── io_k8s_api_core_v1_affinity.py │ │ ├── io_k8s_api_core_v1_app_armor_profile.py │ │ ├── io_k8s_api_core_v1_aws_elastic_block_store_volume_source.py │ │ ├── io_k8s_api_core_v1_azure_disk_volume_source.py │ │ ├── io_k8s_api_core_v1_azure_file_volume_source.py │ │ ├── io_k8s_api_core_v1_capabilities.py │ │ ├── io_k8s_api_core_v1_ceph_fs_volume_source.py │ │ ├── io_k8s_api_core_v1_cinder_volume_source.py │ │ ├── io_k8s_api_core_v1_cluster_trust_bundle_projection.py │ │ ├── io_k8s_api_core_v1_config_map_env_source.py │ │ ├── io_k8s_api_core_v1_config_map_key_selector.py │ │ ├── io_k8s_api_core_v1_config_map_projection.py │ │ ├── io_k8s_api_core_v1_config_map_volume_source.py │ │ ├── io_k8s_api_core_v1_container.py │ │ ├── io_k8s_api_core_v1_container_port.py │ │ ├── io_k8s_api_core_v1_container_resize_policy.py │ │ ├── io_k8s_api_core_v1_csi_volume_source.py │ │ ├── io_k8s_api_core_v1_downward_api_projection.py │ │ ├── io_k8s_api_core_v1_downward_api_volume_file.py │ │ ├── io_k8s_api_core_v1_downward_api_volume_source.py │ │ ├── io_k8s_api_core_v1_empty_dir_volume_source.py │ │ ├── io_k8s_api_core_v1_env_from_source.py │ │ ├── io_k8s_api_core_v1_env_var.py │ │ ├── io_k8s_api_core_v1_env_var_source.py │ │ ├── io_k8s_api_core_v1_ephemeral_container.py │ │ ├── io_k8s_api_core_v1_ephemeral_volume_source.py │ │ ├── io_k8s_api_core_v1_exec_action.py │ │ ├── io_k8s_api_core_v1_fc_volume_source.py │ │ ├── io_k8s_api_core_v1_flex_volume_source.py │ │ ├── io_k8s_api_core_v1_flocker_volume_source.py │ │ ├── io_k8s_api_core_v1_gce_persistent_disk_volume_source.py │ │ ├── io_k8s_api_core_v1_git_repo_volume_source.py │ │ ├── io_k8s_api_core_v1_glusterfs_volume_source.py │ │ ├── io_k8s_api_core_v1_grpc_action.py │ │ ├── io_k8s_api_core_v1_host_alias.py │ │ ├── io_k8s_api_core_v1_host_path_volume_source.py │ │ ├── io_k8s_api_core_v1_http_get_action.py │ │ ├── io_k8s_api_core_v1_http_header.py │ │ ├── io_k8s_api_core_v1_image_volume_source.py │ │ ├── io_k8s_api_core_v1_iscsi_volume_source.py │ │ ├── io_k8s_api_core_v1_key_to_path.py │ │ ├── io_k8s_api_core_v1_lifecycle.py │ │ ├── io_k8s_api_core_v1_lifecycle_handler.py │ │ ├── io_k8s_api_core_v1_local_object_reference.py │ │ ├── io_k8s_api_core_v1_nfs_volume_source.py │ │ ├── io_k8s_api_core_v1_node_affinity.py │ │ ├── io_k8s_api_core_v1_node_selector.py │ │ ├── io_k8s_api_core_v1_node_selector_requirement.py │ │ ├── io_k8s_api_core_v1_node_selector_term.py │ │ ├── io_k8s_api_core_v1_object_field_selector.py │ │ ├── io_k8s_api_core_v1_persistent_volume_claim_spec.py │ │ ├── io_k8s_api_core_v1_persistent_volume_claim_template.py │ │ ├── io_k8s_api_core_v1_persistent_volume_claim_volume_source.py │ │ ├── io_k8s_api_core_v1_photon_persistent_disk_volume_source.py │ │ ├── io_k8s_api_core_v1_pod_affinity.py │ │ ├── io_k8s_api_core_v1_pod_affinity_term.py │ │ ├── io_k8s_api_core_v1_pod_anti_affinity.py │ │ ├── io_k8s_api_core_v1_pod_dns_config.py │ │ ├── io_k8s_api_core_v1_pod_dns_config_option.py │ │ ├── io_k8s_api_core_v1_pod_os.py │ │ ├── io_k8s_api_core_v1_pod_readiness_gate.py │ │ ├── io_k8s_api_core_v1_pod_resource_claim.py │ │ ├── io_k8s_api_core_v1_pod_scheduling_gate.py │ │ ├── io_k8s_api_core_v1_pod_security_context.py │ │ ├── io_k8s_api_core_v1_pod_spec.py │ │ ├── io_k8s_api_core_v1_pod_template_spec.py │ │ ├── io_k8s_api_core_v1_portworx_volume_source.py │ │ ├── io_k8s_api_core_v1_preferred_scheduling_term.py │ │ ├── io_k8s_api_core_v1_probe.py │ │ ├── io_k8s_api_core_v1_projected_volume_source.py │ │ ├── io_k8s_api_core_v1_quobyte_volume_source.py │ │ ├── io_k8s_api_core_v1_rbd_volume_source.py │ │ ├── io_k8s_api_core_v1_resource_claim.py │ │ ├── io_k8s_api_core_v1_resource_field_selector.py │ │ ├── io_k8s_api_core_v1_resource_requirements.py │ │ ├── io_k8s_api_core_v1_scale_io_volume_source.py │ │ ├── io_k8s_api_core_v1_se_linux_options.py │ │ ├── io_k8s_api_core_v1_seccomp_profile.py │ │ ├── io_k8s_api_core_v1_secret_env_source.py │ │ ├── io_k8s_api_core_v1_secret_key_selector.py │ │ ├── io_k8s_api_core_v1_secret_projection.py │ │ ├── io_k8s_api_core_v1_secret_volume_source.py │ │ ├── io_k8s_api_core_v1_security_context.py │ │ ├── io_k8s_api_core_v1_service_account_token_projection.py │ │ ├── io_k8s_api_core_v1_sleep_action.py │ │ ├── io_k8s_api_core_v1_storage_os_volume_source.py │ │ ├── io_k8s_api_core_v1_sysctl.py │ │ ├── io_k8s_api_core_v1_tcp_socket_action.py │ │ ├── io_k8s_api_core_v1_toleration.py │ │ ├── io_k8s_api_core_v1_topology_spread_constraint.py │ │ ├── io_k8s_api_core_v1_typed_local_object_reference.py │ │ ├── io_k8s_api_core_v1_typed_object_reference.py │ │ ├── io_k8s_api_core_v1_volume.py │ │ ├── io_k8s_api_core_v1_volume_device.py │ │ ├── io_k8s_api_core_v1_volume_mount.py │ │ ├── io_k8s_api_core_v1_volume_projection.py │ │ ├── io_k8s_api_core_v1_volume_resource_requirements.py │ │ ├── io_k8s_api_core_v1_vsphere_virtual_disk_volume_source.py │ │ ├── io_k8s_api_core_v1_weighted_pod_affinity_term.py │ │ ├── io_k8s_api_core_v1_windows_security_context_options.py │ │ ├── io_k8s_apimachinery_pkg_apis_meta_v1_condition.py │ │ ├── io_k8s_apimachinery_pkg_apis_meta_v1_label_selector.py │ │ ├── io_k8s_apimachinery_pkg_apis_meta_v1_label_selector_requirement.py │ │ ├── io_k8s_apimachinery_pkg_apis_meta_v1_list_meta.py │ │ ├── io_k8s_apimachinery_pkg_apis_meta_v1_managed_fields_entry.py │ │ ├── io_k8s_apimachinery_pkg_apis_meta_v1_object_meta.py │ │ ├── io_k8s_apimachinery_pkg_apis_meta_v1_owner_reference.py │ │ ├── jobset_v1alpha2_coordinator.py │ │ ├── jobset_v1alpha2_depends_on.py │ │ ├── jobset_v1alpha2_failure_policy.py │ │ ├── jobset_v1alpha2_failure_policy_rule.py │ │ ├── jobset_v1alpha2_job_set.py │ │ ├── jobset_v1alpha2_job_set_list.py │ │ ├── jobset_v1alpha2_job_set_spec.py │ │ ├── jobset_v1alpha2_job_set_status.py │ │ ├── jobset_v1alpha2_network.py │ │ ├── jobset_v1alpha2_replicated_job.py │ │ ├── jobset_v1alpha2_replicated_job_status.py │ │ ├── jobset_v1alpha2_startup_policy.py │ │ └── jobset_v1alpha2_success_policy.py │ ├── py.typed │ └── rest.py │ ├── pyproject.toml │ ├── requirements.txt │ ├── setup.cfg │ ├── test-requirements.txt │ ├── test │ ├── __init__.py │ ├── test_io_k8s_api_batch_v1_job_spec.py │ ├── test_io_k8s_api_batch_v1_job_template_spec.py │ ├── test_io_k8s_api_batch_v1_pod_failure_policy.py │ ├── test_io_k8s_api_batch_v1_pod_failure_policy_on_exit_codes_requirement.py │ ├── test_io_k8s_api_batch_v1_pod_failure_policy_on_pod_conditions_pattern.py │ ├── test_io_k8s_api_batch_v1_pod_failure_policy_rule.py │ ├── test_io_k8s_api_batch_v1_success_policy.py │ ├── test_io_k8s_api_batch_v1_success_policy_rule.py │ ├── test_io_k8s_api_core_v1_affinity.py │ ├── test_io_k8s_api_core_v1_app_armor_profile.py │ ├── test_io_k8s_api_core_v1_aws_elastic_block_store_volume_source.py │ ├── test_io_k8s_api_core_v1_azure_disk_volume_source.py │ ├── test_io_k8s_api_core_v1_azure_file_volume_source.py │ ├── test_io_k8s_api_core_v1_capabilities.py │ ├── test_io_k8s_api_core_v1_ceph_fs_volume_source.py │ ├── test_io_k8s_api_core_v1_cinder_volume_source.py │ ├── test_io_k8s_api_core_v1_cluster_trust_bundle_projection.py │ ├── test_io_k8s_api_core_v1_config_map_env_source.py │ ├── test_io_k8s_api_core_v1_config_map_key_selector.py │ ├── test_io_k8s_api_core_v1_config_map_projection.py │ ├── test_io_k8s_api_core_v1_config_map_volume_source.py │ ├── test_io_k8s_api_core_v1_container.py │ ├── test_io_k8s_api_core_v1_container_port.py │ ├── test_io_k8s_api_core_v1_container_resize_policy.py │ ├── test_io_k8s_api_core_v1_csi_volume_source.py │ ├── test_io_k8s_api_core_v1_downward_api_projection.py │ ├── test_io_k8s_api_core_v1_downward_api_volume_file.py │ ├── test_io_k8s_api_core_v1_downward_api_volume_source.py │ ├── test_io_k8s_api_core_v1_empty_dir_volume_source.py │ ├── test_io_k8s_api_core_v1_env_from_source.py │ ├── test_io_k8s_api_core_v1_env_var.py │ ├── test_io_k8s_api_core_v1_env_var_source.py │ ├── test_io_k8s_api_core_v1_ephemeral_container.py │ ├── test_io_k8s_api_core_v1_ephemeral_volume_source.py │ ├── test_io_k8s_api_core_v1_exec_action.py │ ├── test_io_k8s_api_core_v1_fc_volume_source.py │ ├── test_io_k8s_api_core_v1_flex_volume_source.py │ ├── test_io_k8s_api_core_v1_flocker_volume_source.py │ ├── test_io_k8s_api_core_v1_gce_persistent_disk_volume_source.py │ ├── test_io_k8s_api_core_v1_git_repo_volume_source.py │ ├── test_io_k8s_api_core_v1_glusterfs_volume_source.py │ ├── test_io_k8s_api_core_v1_grpc_action.py │ ├── test_io_k8s_api_core_v1_host_alias.py │ ├── test_io_k8s_api_core_v1_host_path_volume_source.py │ ├── test_io_k8s_api_core_v1_http_get_action.py │ ├── test_io_k8s_api_core_v1_http_header.py │ ├── test_io_k8s_api_core_v1_image_volume_source.py │ ├── test_io_k8s_api_core_v1_iscsi_volume_source.py │ ├── test_io_k8s_api_core_v1_key_to_path.py │ ├── test_io_k8s_api_core_v1_lifecycle.py │ ├── test_io_k8s_api_core_v1_lifecycle_handler.py │ ├── test_io_k8s_api_core_v1_local_object_reference.py │ ├── test_io_k8s_api_core_v1_nfs_volume_source.py │ ├── test_io_k8s_api_core_v1_node_affinity.py │ ├── test_io_k8s_api_core_v1_node_selector.py │ ├── test_io_k8s_api_core_v1_node_selector_requirement.py │ ├── test_io_k8s_api_core_v1_node_selector_term.py │ ├── test_io_k8s_api_core_v1_object_field_selector.py │ ├── test_io_k8s_api_core_v1_persistent_volume_claim_spec.py │ ├── test_io_k8s_api_core_v1_persistent_volume_claim_template.py │ ├── test_io_k8s_api_core_v1_persistent_volume_claim_volume_source.py │ ├── test_io_k8s_api_core_v1_photon_persistent_disk_volume_source.py │ ├── test_io_k8s_api_core_v1_pod_affinity.py │ ├── test_io_k8s_api_core_v1_pod_affinity_term.py │ ├── test_io_k8s_api_core_v1_pod_anti_affinity.py │ ├── test_io_k8s_api_core_v1_pod_dns_config.py │ ├── test_io_k8s_api_core_v1_pod_dns_config_option.py │ ├── test_io_k8s_api_core_v1_pod_os.py │ ├── test_io_k8s_api_core_v1_pod_readiness_gate.py │ ├── test_io_k8s_api_core_v1_pod_resource_claim.py │ ├── test_io_k8s_api_core_v1_pod_scheduling_gate.py │ ├── test_io_k8s_api_core_v1_pod_security_context.py │ ├── test_io_k8s_api_core_v1_pod_spec.py │ ├── test_io_k8s_api_core_v1_pod_template_spec.py │ ├── test_io_k8s_api_core_v1_portworx_volume_source.py │ ├── test_io_k8s_api_core_v1_preferred_scheduling_term.py │ ├── test_io_k8s_api_core_v1_probe.py │ ├── test_io_k8s_api_core_v1_projected_volume_source.py │ ├── test_io_k8s_api_core_v1_quobyte_volume_source.py │ ├── test_io_k8s_api_core_v1_rbd_volume_source.py │ ├── test_io_k8s_api_core_v1_resource_claim.py │ ├── test_io_k8s_api_core_v1_resource_field_selector.py │ ├── test_io_k8s_api_core_v1_resource_requirements.py │ ├── test_io_k8s_api_core_v1_scale_io_volume_source.py │ ├── test_io_k8s_api_core_v1_se_linux_options.py │ ├── test_io_k8s_api_core_v1_seccomp_profile.py │ ├── test_io_k8s_api_core_v1_secret_env_source.py │ ├── test_io_k8s_api_core_v1_secret_key_selector.py │ ├── test_io_k8s_api_core_v1_secret_projection.py │ ├── test_io_k8s_api_core_v1_secret_volume_source.py │ ├── test_io_k8s_api_core_v1_security_context.py │ ├── test_io_k8s_api_core_v1_service_account_token_projection.py │ ├── test_io_k8s_api_core_v1_sleep_action.py │ ├── test_io_k8s_api_core_v1_storage_os_volume_source.py │ ├── test_io_k8s_api_core_v1_sysctl.py │ ├── test_io_k8s_api_core_v1_tcp_socket_action.py │ ├── test_io_k8s_api_core_v1_toleration.py │ ├── test_io_k8s_api_core_v1_topology_spread_constraint.py │ ├── test_io_k8s_api_core_v1_typed_local_object_reference.py │ ├── test_io_k8s_api_core_v1_typed_object_reference.py │ ├── test_io_k8s_api_core_v1_volume.py │ ├── test_io_k8s_api_core_v1_volume_device.py │ ├── test_io_k8s_api_core_v1_volume_mount.py │ ├── test_io_k8s_api_core_v1_volume_projection.py │ ├── test_io_k8s_api_core_v1_volume_resource_requirements.py │ ├── test_io_k8s_api_core_v1_vsphere_virtual_disk_volume_source.py │ ├── test_io_k8s_api_core_v1_weighted_pod_affinity_term.py │ ├── test_io_k8s_api_core_v1_windows_security_context_options.py │ ├── test_io_k8s_apimachinery_pkg_apis_meta_v1_condition.py │ ├── test_io_k8s_apimachinery_pkg_apis_meta_v1_label_selector.py │ ├── test_io_k8s_apimachinery_pkg_apis_meta_v1_label_selector_requirement.py │ ├── test_io_k8s_apimachinery_pkg_apis_meta_v1_list_meta.py │ ├── test_io_k8s_apimachinery_pkg_apis_meta_v1_managed_fields_entry.py │ ├── test_io_k8s_apimachinery_pkg_apis_meta_v1_object_meta.py │ ├── test_io_k8s_apimachinery_pkg_apis_meta_v1_owner_reference.py │ ├── test_jobset_v1alpha2_coordinator.py │ ├── test_jobset_v1alpha2_depends_on.py │ ├── test_jobset_v1alpha2_failure_policy.py │ ├── test_jobset_v1alpha2_failure_policy_rule.py │ ├── test_jobset_v1alpha2_job_set.py │ ├── test_jobset_v1alpha2_job_set_list.py │ ├── test_jobset_v1alpha2_job_set_spec.py │ ├── test_jobset_v1alpha2_job_set_status.py │ ├── test_jobset_v1alpha2_network.py │ ├── test_jobset_v1alpha2_replicated_job.py │ ├── test_jobset_v1alpha2_replicated_job_status.py │ ├── test_jobset_v1alpha2_startup_policy.py │ └── test_jobset_v1alpha2_success_policy.py │ └── tox.ini ├── site ├── .gitignore ├── OWNERS ├── archetypes │ └── default.md ├── assets │ ├── icons │ │ └── logo.svg │ └── scss │ │ ├── _styles_project.scss │ │ └── _variables_project.scss ├── config.toml ├── content │ └── en │ │ ├── _index.html │ │ ├── docs │ │ ├── _index.md │ │ ├── adopters │ │ │ └── _index.md │ │ ├── concepts │ │ │ └── _index.md │ │ ├── contribution guidelines │ │ │ └── _index.md │ │ ├── installation │ │ │ └── _index.md │ │ ├── overview │ │ │ └── _index.md │ │ ├── reference │ │ │ ├── _index.md │ │ │ ├── jobset.v1alpha2.md │ │ │ └── metrics.md │ │ ├── tasks │ │ │ └── _index.md │ │ └── troubleshooting │ │ │ └── _index.md │ │ ├── featured-background.png │ │ └── search.md ├── layouts │ ├── 404.html │ ├── partials │ │ ├── feedback.html │ │ ├── footer.html │ │ ├── head.html │ │ ├── navbar-version-selector.html │ │ ├── navbar.html │ │ └── seo_schema.html │ ├── shortcodes │ │ ├── blocks │ │ │ ├── content-item.html │ │ │ ├── content-section.html │ │ │ ├── link-down.html │ │ │ ├── sample-section.html │ │ │ ├── tab.html │ │ │ └── tabs.html │ │ ├── include.html │ │ ├── needs-update.html │ │ └── params.html │ └── sitemap.xml ├── package-lock.json ├── package.json └── static │ ├── examples │ ├── argo-workflow │ │ ├── rbac.yaml │ │ └── workflow.yaml │ ├── client-go │ │ ├── README.md │ │ ├── go.mod │ │ ├── go.sum │ │ └── main.go │ ├── depends-on │ │ ├── depends-on.yaml │ │ └── multiple-depends-on.yaml │ ├── failure-policy │ │ ├── failjobset-action.yaml │ │ ├── host-maintenance-event-model.yaml │ │ ├── onjobfailurereasons-present-podfailurepolicy.yaml │ │ ├── onjobfailurereasons-present.yaml │ │ ├── restartjobset-action.yaml │ │ └── restartjobsetandignoremaxrestarts-action.yaml │ ├── prometheus-operator │ │ ├── README.md │ │ ├── prometheus.png │ │ └── prometheus.yaml │ ├── pytorch │ │ ├── cnn-mnist │ │ │ ├── Dockerfile │ │ │ ├── mnist.py │ │ │ └── mnist.yaml │ │ └── resnet-cifar10 │ │ │ └── resnet.yaml │ ├── simple │ │ ├── coordinator.yaml │ │ ├── exclusive-placement.yaml │ │ ├── failure-policy.yaml │ │ ├── group.yaml │ │ ├── jobset-with-network.yaml │ │ ├── paralleljobs.yaml │ │ ├── success-policy.yaml │ │ └── ttl-after-finished.yaml │ ├── startup-policy │ │ └── startup-driver-ready.yaml │ └── tensorflow │ │ └── mnist.yaml │ ├── favicons │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── apple-touch-icon.png │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── favicon.ico │ └── site.webmanifest │ └── images │ ├── jobset_diagram.png │ └── logo.svg └── test ├── README.md ├── e2e ├── config │ ├── image_pull_policy.yaml │ └── kustomization.yaml ├── e2e_test.go └── suite_test.go ├── integration ├── controller │ ├── jobset_controller_test.go │ └── suite_test.go └── webhook │ ├── jobset_webhook_test.go │ └── suite_test.go └── util └── util.go /.dockerignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Report a bug encountered while using JobSet 4 | labels: kind/bug 5 | 6 | --- 7 | 8 | 12 | 13 | 14 | **What happened**: 15 | 16 | **What you expected to happen**: 17 | 18 | **How to reproduce it (as minimally and precisely as possible)**: 19 | 20 | **Anything else we need to know?**: 21 | 22 | **Environment**: 23 | - Kubernetes version (use `kubectl version`): 24 | - JobSet version (use `git describe --tags --dirty --always`): 25 | - Cloud provider or hardware configuration: 26 | - Install tools: 27 | - Others: -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | 12 | **What would you like to be added**: 13 | 14 | **Why is this needed**: 15 | 16 | This enhancement requires the following artifacts: 17 | 18 | - [ ] Design doc 19 | - [ ] API change 20 | - [ ] Docs update 21 | 22 | The artifacts should be linked in subsequent comments. -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for go 4 | - package-ecosystem: "gomod" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | labels: 9 | - "ok-to-test" 10 | groups: 11 | kubernetes: 12 | patterns: 13 | - "k8s.io/*" 14 | - "sigs.k8s.io/*" 15 | ignore: 16 | # Ignore major and minor versions for dependencies updates 17 | # Allow patches and security updates. 18 | - dependency-name: k8s.io/* 19 | update-types: ["version-update:semver-major", "version-update:semver-minor"] 20 | 21 | -------------------------------------------------------------------------------- /.golangci.yaml: -------------------------------------------------------------------------------- 1 | version: "2" 2 | linters: 3 | enable: 4 | - unparam 5 | exclusions: 6 | generated: lax 7 | presets: 8 | - comments 9 | - common-false-positives 10 | - legacy 11 | - std-error-handling 12 | paths: 13 | - bin 14 | - third_party$ 15 | - builtin$ 16 | - examples$ 17 | formatters: 18 | enable: 19 | - goimports 20 | settings: 21 | goimports: 22 | local-prefixes: 23 | - sigs.k8s.io/jobset 24 | exclusions: 25 | generated: lax 26 | paths: 27 | - bin 28 | - third_party$ 29 | - builtin$ 30 | - examples$ 31 | -------------------------------------------------------------------------------- /CHANGELOG/README.md: -------------------------------------------------------------------------------- 1 | placeholder -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Welcome to Kubernetes. We are excited about the prospect of you joining our [community](https://git.k8s.io/community)! The Kubernetes community abides by the CNCF [code of conduct](code-of-conduct.md). Here is an excerpt: 4 | 5 | _As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities._ 6 | 7 | ## Getting Started 8 | 9 | We have full documentation on how to get started contributing here: 10 | 11 | 14 | 15 | - [Contributor License Agreement](https://git.k8s.io/community/CLA.md) - Kubernetes projects require that you sign a Contributor License Agreement (CLA) before we can accept your pull requests 16 | - [Kubernetes Contributor Guide](https://k8s.dev/guide) - Main contributor documentation, or you can just jump directly to the [contributing page](https://k8s.dev/docs/guide/contributing/) 17 | - [Contributor Cheat Sheet](https://k8s.dev/cheatsheet) - Common resources for existing developers 18 | 19 | ## Mentorship 20 | 21 | - [Mentoring Initiatives](https://k8s.dev/community/mentoring) - We have a diverse set of mentorship programs available that are always looking for volunteers! 22 | 23 | ## Contact Information 24 | 25 | - [Slack](https://kubernetes.slack.com/messages/sig-apps) 26 | - [Mailing List](https://groups.google.com/forum/#!forum/kubernetes-sig-apps) 27 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILDER_IMAGE=golang:1.24 2 | ARG BASE_IMAGE=gcr.io/distroless/static:nonroot 3 | 4 | # Build the manager binary 5 | FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} AS builder 6 | 7 | ARG CGO_ENABLED 8 | ARG TARGETARCH 9 | 10 | WORKDIR /workspace 11 | 12 | # Copy the go source 13 | COPY . . 14 | 15 | # Build 16 | RUN make build GO_BUILD_ENV='CGO_ENABLED=${CGO_ENABLED} GOOS=linux GOARCH=${TARGETARCH}' 17 | 18 | FROM --platform=${BUILDPLATFORM} ${BASE_IMAGE} 19 | WORKDIR / 20 | COPY --from=builder /workspace/bin/manager . 21 | USER 65532:65532 22 | 23 | ENTRYPOINT ["/manager"] 24 | -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | # See the OWNERS docs at https://go.k8s.io/owners 2 | 3 | approvers: 4 | - ahg-g 5 | - danielvegamyhre 6 | - kannon92 7 | reviewers: 8 | - kannon92 9 | -------------------------------------------------------------------------------- /PROJECT: -------------------------------------------------------------------------------- 1 | # Code generated by tool. DO NOT EDIT. 2 | # This file is used to track the info used to scaffold your project 3 | # and allow the plugins properly work. 4 | # More info: https://book.kubebuilder.io/reference/project-config.html 5 | domain: x-k8s.io 6 | layout: 7 | - go.kubebuilder.io/v3 8 | projectName: jobset 9 | repo: sigs.k8s.io/jobset 10 | resources: 11 | - api: 12 | crdVersion: v1 13 | namespaced: true 14 | controller: true 15 | domain: x-k8s.io 16 | group: jobset 17 | kind: JobSet 18 | path: sigs.k8s.io/jobset/api/jobset/v1alpha2 19 | version: v1alpha2 20 | webhooks: 21 | defaulting: true 22 | validation: true 23 | webhookVersion: v1 24 | - api: 25 | crdVersion: v1 26 | namespaced: true 27 | domain: jobset.x-k8s.io 28 | group: jobset 29 | kind: Configuration 30 | path: sigs.k8s.io/jobset/api/config/v1alpha1 31 | version: v1alpha1 32 | version: "3" 33 | -------------------------------------------------------------------------------- /RELEASE.md: -------------------------------------------------------------------------------- 1 | # Release Process 2 | 3 | The Kubernetes Template Project is released on an as-needed basis. The process is as follows: 4 | 5 | 1. An issue is proposing a new release with a changelog since the last release 6 | 2. All [OWNERS](OWNERS) must LGTM this release 7 | 3. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` 8 | 4. The release issue is closed 9 | 5. An announcement email is sent to `dev@kubernetes.io` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released` 10 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Security Announcements 4 | 5 | Join the [kubernetes-security-announce] group for security and vulnerability announcements. 6 | 7 | ## Reporting a Vulnerability 8 | 9 | Instructions for reporting a vulnerability can be found on the 10 | [Kubernetes Security and Disclosure Information] page. 11 | 12 | ## Supported Versions 13 | 14 | Information about supported Kubernetes versions can be found on the 15 | [Kubernetes version and version skew support policy] page on the Kubernetes website. 16 | 17 | [kubernetes-security-announce]: https://groups.google.com/forum/#!forum/kubernetes-security-announce 18 | [Kubernetes version and version skew support policy]: https://kubernetes.io/docs/setup/release/version-skew-policy/#supported-versions 19 | [Kubernetes Security and Disclosure Information]: https://kubernetes.io/docs/reference/issues-security/security/#report-a-vulnerability 20 | -------------------------------------------------------------------------------- /SECURITY_CONTACTS: -------------------------------------------------------------------------------- 1 | # Defined below are the security contacts for this repo. 2 | # 3 | # They are the contact point for the Security Response Committee to reach out 4 | # to for triaging and handling of incoming issues. 5 | # 6 | # The below names agree to abide by the 7 | # [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy) 8 | # and will be removed and replaced if they violate that agreement. 9 | # 10 | # DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE 11 | # INSTRUCTIONS AT https://kubernetes.io/security/ 12 | 13 | ahg-g 14 | danielvegamyhre 15 | -------------------------------------------------------------------------------- /api/config/v1alpha1/groupversion_info.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package v1alpha1 contains API Schema definitions for the jobset v1alpha1 API group 18 | // +kubebuilder:object:generate=true 19 | // +groupName=jobset.x-k8s.io 20 | package v1alpha1 21 | 22 | import ( 23 | "k8s.io/apimachinery/pkg/runtime/schema" 24 | "sigs.k8s.io/controller-runtime/pkg/scheme" 25 | ) 26 | 27 | var ( 28 | // GroupVersion is group version used to register these objects 29 | GroupVersion = schema.GroupVersion{Group: "config.jobset.x-k8s.io", Version: "v1alpha1"} 30 | 31 | // SchemeBuilder is used to add go types to the GroupVersionKind scheme 32 | SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} 33 | 34 | // localSchemeBuilder is used to register autogenerated conversion and defaults functions 35 | // It is required by ./zz_generated.conversion.go and ./zz_generated.defaults.go 36 | localSchemeBuilder = &SchemeBuilder.SchemeBuilder 37 | 38 | // AddToScheme adds the types in this group-version to the given scheme. 39 | AddToScheme = SchemeBuilder.AddToScheme 40 | ) 41 | 42 | func init() { 43 | SchemeBuilder.Register(&Configuration{}) 44 | localSchemeBuilder.Register(RegisterDefaults) 45 | } 46 | -------------------------------------------------------------------------------- /api/config/v1alpha1/zz_generated.defaults.go: -------------------------------------------------------------------------------- 1 | //go:build !ignore_autogenerated 2 | // +build !ignore_autogenerated 3 | 4 | /* 5 | Copyright 2023 The Kubernetes Authors. 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | // Code generated by defaulter-gen. DO NOT EDIT. 17 | 18 | package v1alpha1 19 | 20 | import ( 21 | runtime "k8s.io/apimachinery/pkg/runtime" 22 | ) 23 | 24 | // RegisterDefaults adds defaulters functions to the given scheme. 25 | // Public to allow building arbitrary schemes. 26 | // All generated defaulters are covering - they call all nested defaulters. 27 | func RegisterDefaults(scheme *runtime.Scheme) error { 28 | scheme.AddTypeDefaultingFunc(&Configuration{}, func(obj interface{}) { SetObjectDefaults_Configuration(obj.(*Configuration)) }) 29 | return nil 30 | } 31 | 32 | func SetObjectDefaults_Configuration(in *Configuration) { 33 | SetDefaults_Configuration(in) 34 | } 35 | -------------------------------------------------------------------------------- /api/jobset/v1alpha2/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:openapi-gen=true 18 | // +kubebuilder:object:generate=true 19 | // +groupName=jobset.x-k8s.io 20 | 21 | package v1alpha2 22 | -------------------------------------------------------------------------------- /api/jobset/v1alpha2/groupversion_info.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | // Package v1alpha2 contains API Schema definitions for the batch v1alpha2 API group 15 | // +kubebuilder:object:generate=true 16 | // +groupName=jobset.x-k8s.io 17 | package v1alpha2 18 | 19 | import ( 20 | "k8s.io/apimachinery/pkg/runtime/schema" 21 | "sigs.k8s.io/controller-runtime/pkg/scheme" 22 | ) 23 | 24 | var ( 25 | // GroupVersion is group version used to register these objects 26 | GroupVersion = schema.GroupVersion{Group: "jobset.x-k8s.io", Version: "v1alpha2"} 27 | 28 | // SchemeGroupVersion is alias to GroupVersion for client-go libraries. 29 | // It is required by pkg/client/informers/externalversions/... 30 | SchemeGroupVersion = GroupVersion 31 | 32 | // SchemeBuilder is used to add go types to the GroupVersionKind scheme 33 | SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} 34 | 35 | // AddToScheme adds the types in this group-version to the given scheme. 36 | AddToScheme = SchemeBuilder.AddToScheme 37 | ) 38 | 39 | // Resource is required by pkg/client/listers/... 40 | func Resource(resource string) schema.GroupResource { 41 | return GroupVersion.WithResource(resource).GroupResource() 42 | } 43 | -------------------------------------------------------------------------------- /api/jobset/v1alpha2/types.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | /* 18 | This file is needed for kubernetes/code-generator/kube_codegen.sh script used in hack/update-codegen.sh. 19 | */ 20 | 21 | package v1alpha2 22 | 23 | //+genclient 24 | -------------------------------------------------------------------------------- /charts/jobset/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | 5 | ci/ 6 | .helmignore 7 | 8 | # Common VCS dirs 9 | .git/ 10 | .gitignore 11 | .bzr/ 12 | .bzrignore 13 | .hg/ 14 | .hgignore 15 | .svn/ 16 | 17 | # Common backup files 18 | *.swp 19 | *.bak 20 | *.tmp 21 | *.orig 22 | *~ 23 | 24 | # Various IDEs 25 | *.tmproj 26 | .project 27 | .idea/ 28 | .vscode/ 29 | 30 | # MacOS 31 | .DS_Store 32 | 33 | # helm-unittest 34 | tests 35 | .debug 36 | __snapshot__ 37 | 38 | # helm-docs 39 | README.md.gotmpl 40 | -------------------------------------------------------------------------------- /charts/jobset/Chart.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2025 The Kubernetes authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | apiVersion: v2 17 | 18 | name: jobset 19 | 20 | description: A Helm chart for deploying JobSet controller and webhook on Kubernetes. 21 | 22 | type: application 23 | 24 | version: 0.8.1 25 | 26 | keywords: 27 | - kubernetes 28 | - batch 29 | - jobset 30 | 31 | home: https://github.com/kubernetes-sigs/jobset 32 | 33 | maintainers: 34 | - name: ahg-g 35 | url: https://github.com/ahg-g 36 | - name: danielvegamyhre 37 | url: https://github.com/danielvegamyhre 38 | - name: kannon92 39 | url: https://github.com/kannon92 40 | -------------------------------------------------------------------------------- /charts/jobset/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | {{/* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */}} 16 | 17 | Thank you for installing {{ .Chart.Name }}. The JobSet controller is now deployed in your cluster. To verify that the controller is running, you can run: 18 | kubectl get deployment -n {{ .Release.Namespace }} {{ include "jobset.controller.deployment.name" . }} 19 | To access the metrics endpoint: 20 | kubectl port-forward svc/{{ include "jobset.metrics.service.name" . }} 8443 21 | -------------------------------------------------------------------------------- /charts/jobset/templates/certmanager/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | {{/* 18 | Create the name of the jobset webhook certificate issuer. 19 | */}} 20 | {{- define "jobset.certManager.issuer.name" -}} 21 | {{ include "jobset.name" . }}-self-signed-issuer 22 | {{- end -}} 23 | 24 | 25 | {{/* 26 | Create the name of the jobset webhook certificate. 27 | */}} 28 | {{- define "jobset.certManager.certificate.name" -}} 29 | {{ include "jobset.name" . }}-cert 30 | {{- end -}} 31 | 32 | 33 | {{/* 34 | Create the name of the jobset metrics certificate. 35 | */}} 36 | {{- define "jobset.certManager.metricsCertificate.name" -}} 37 | {{ include "jobset.name" . }}-metrics-cert 38 | {{- end -}} 39 | -------------------------------------------------------------------------------- /charts/jobset/templates/certmanager/certificate.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | {{- if .Values.certManager.enable }} 18 | apiVersion: cert-manager.io/v1 19 | kind: Certificate 20 | metadata: 21 | name: {{ include "jobset.certManager.certificate.name" . }} 22 | namespace: {{ .Release.Namespace}} 23 | labels: 24 | {{- include "jobset.labels" . | nindent 4 }} 25 | spec: 26 | secretName: {{ include "jobset.webhook.secret.name" . }} 27 | issuerRef: 28 | {{- if not .Values.certManager.issuerRef }} 29 | group: cert-manager.io 30 | kind: Issuer 31 | name: {{ include "jobset.certManager.issuer.name" . }} 32 | {{- else }} 33 | {{- toYaml .Values.certManager.issuerRef | nindent 4 }} 34 | {{- end }} 35 | commonName: {{ include "jobset.name" . }}-webhook 36 | dnsNames: 37 | - {{ include "jobset.webhook.service.name" . }}.{{ .Release.Namespace }}.svc 38 | - {{ include "jobset.webhook.service.name" . }}.{{ .Release.Namespace }}.svc.cluster.local 39 | duration: 8760h 40 | renewBefore: 720h 41 | usages: 42 | - server auth 43 | - client auth 44 | {{- end }} 45 | -------------------------------------------------------------------------------- /charts/jobset/templates/certmanager/certificate_metrics.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | {{- if .Values.certManager.enable }} 18 | apiVersion: cert-manager.io/v1 19 | kind: Certificate 20 | metadata: 21 | name: {{ include "jobset.certManager.metricsCertificate.name" . }} 22 | namespace: {{ .Release.Namespace}} 23 | labels: 24 | {{- include "jobset.labels" . | nindent 4 }} 25 | spec: 26 | secretName: {{ include "jobset.metrics.secret.name" . }} 27 | issuerRef: 28 | {{- with .Values.certManager.issuerRef }} 29 | {{ toYaml . | nindent 4 }} 30 | {{- else }} 31 | group: cert-manager.io 32 | kind: Issuer 33 | name: {{ include "jobset.certManager.issuer.name" . }} 34 | {{- end }} 35 | commonName: {{ include "jobset.name" . }}-metrics 36 | dnsNames: 37 | - {{ include "jobset.metrics.service.name" . }}.{{ .Release.Namespace }}.svc 38 | - {{ include "jobset.metrics.service.name" . }}.{{ .Release.Namespace }}.svc.cluster.local 39 | duration: 8760h 40 | renewBefore: 720h 41 | usages: 42 | - server auth 43 | - client auth 44 | {{- end }} 45 | -------------------------------------------------------------------------------- /charts/jobset/templates/certmanager/issuer.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | {{- if and .Values.certManager.enable (not .Values.certManager.issuerRef) }} 18 | apiVersion: cert-manager.io/v1 19 | kind: Issuer 20 | metadata: 21 | name: {{ include "jobset.certManager.issuer.name" . }} 22 | namespace: {{ .Release.Namespace }} 23 | labels: 24 | {{- include "jobset.labels" . | nindent 4 }} 25 | spec: 26 | selfSigned: {} 27 | {{- end }} 28 | -------------------------------------------------------------------------------- /charts/jobset/templates/controller/cluster_role_binding.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | apiVersion: rbac.authorization.k8s.io/v1 18 | kind: ClusterRoleBinding 19 | metadata: 20 | name: {{ include "jobset.controller.clusterRoleBinding.name" . }} 21 | labels: 22 | {{- include "jobset.controller.labels" . | nindent 4 }} 23 | roleRef: 24 | apiGroup: rbac.authorization.k8s.io 25 | kind: ClusterRole 26 | name: {{ include "jobset.controller.clusterRole.name" . }} 27 | subjects: 28 | - kind: ServiceAccount 29 | name: {{ include "jobset.controller.serviceAccount.name" . }} 30 | namespace: {{ .Release.Namespace }} 31 | -------------------------------------------------------------------------------- /charts/jobset/templates/controller/configmap.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | apiVersion: v1 18 | kind: ConfigMap 19 | metadata: 20 | name: {{ include "jobset.controller.configMap.name" . }} 21 | namespace: {{ .Release.Namespace}} 22 | labels: 23 | {{- include "jobset.controller.labels" . | nindent 4 }} 24 | data: 25 | controller_manager_config.yaml: |2 26 | 27 | apiVersion: config.jobset.x-k8s.io/v1alpha1 28 | kind: Configuration 29 | leaderElection: 30 | leaderElect: {{ .Values.controller.leaderElection.enable }} 31 | clientConnection: 32 | qps: {{ .Values.controller.clientConnection.qps }} 33 | burst: {{ .Values.controller.clientConnection.burst }} 34 | internalCertManagement: 35 | enable: {{ not .Values.certManager.enable }} 36 | webhookServiceName: {{ include "jobset.webhook.service.name" . }} 37 | webhookSecretName: {{ include "jobset.webhook.secret.name" . }} 38 | -------------------------------------------------------------------------------- /charts/jobset/templates/controller/role.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | apiVersion: rbac.authorization.k8s.io/v1 18 | kind: Role 19 | metadata: 20 | name: {{ include "jobset.controller.role.name" . }} 21 | namespace: {{ .Release.Namespace }} 22 | labels: 23 | {{- include "jobset.controller.labels" . | nindent 4 }} 24 | rules: 25 | - apiGroups: 26 | - "" 27 | resources: 28 | - configmaps 29 | verbs: 30 | - get 31 | - list 32 | - watch 33 | - create 34 | - update 35 | - patch 36 | - delete 37 | {{- if .Values.controller.leaderElection.enable }} 38 | - apiGroups: 39 | - coordination.k8s.io 40 | resources: 41 | - leases 42 | verbs: 43 | - get 44 | - list 45 | - watch 46 | - create 47 | - update 48 | - delete 49 | {{- end }} 50 | -------------------------------------------------------------------------------- /charts/jobset/templates/controller/role_binding.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | apiVersion: rbac.authorization.k8s.io/v1 18 | kind: RoleBinding 19 | metadata: 20 | name: {{ include "jobset.controller.roleBinding.name" . }} 21 | namespace: {{ .Release.Namespace }} 22 | labels: 23 | {{- include "jobset.controller.labels" . | nindent 4 }} 24 | roleRef: 25 | apiGroup: rbac.authorization.k8s.io 26 | kind: Role 27 | name: {{ include "jobset.controller.role.name" . }} 28 | subjects: 29 | - kind: ServiceAccount 30 | name: {{ include "jobset.controller.serviceAccount.name" . }} 31 | namespace: {{ .Release.Namespace }} 32 | -------------------------------------------------------------------------------- /charts/jobset/templates/controller/service_account.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | apiVersion: v1 18 | kind: ServiceAccount 19 | metadata: 20 | name: {{ include "jobset.controller.serviceAccount.name" . }} 21 | namespace: {{ .Release.Namespace }} 22 | labels: 23 | {{- include "jobset.labels" . | nindent 4 }} 24 | -------------------------------------------------------------------------------- /charts/jobset/templates/prometheus/_helpers.tpl: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | {{/* 18 | Create the name prefix of the resources associated with Prometheus metrics. 19 | */}} 20 | {{- define "jobset.metrics.name" -}} 21 | {{ include "jobset.fullname" . }}-metrics 22 | {{- end -}} 23 | 24 | {{/* 25 | Create the name of the jobset Prometheus metrics service. 26 | */}} 27 | {{- define "jobset.metrics.service.name" -}} 28 | {{ include "jobset.metrics.name" . }}-service 29 | {{- end -}} 30 | 31 | {{/* 32 | Create the name of the jobset Prometheus service monitor. 33 | */}} 34 | {{- define "jobset.metrics.serviceMonitor.name" -}} 35 | {{ include "jobset.metrics.name" . }}-service-monitor 36 | {{- end -}} 37 | 38 | {{/* 39 | Create the name of the jobset serving metrics TLS secret. 40 | */}} 41 | {{- define "jobset.metrics.secret.name" -}} 42 | {{ include "jobset.fullname" . }}-metrics-server-cert 43 | {{- end -}} 44 | -------------------------------------------------------------------------------- /charts/jobset/templates/prometheus/role.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.prometheus.enable }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | name: {{ include "jobset.fullname" . }}-prometheus-k8s 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "jobset.controller.labels" . | nindent 4 }} 9 | rules: 10 | - apiGroups: 11 | - "" 12 | resources: 13 | - services 14 | - endpoints 15 | - pods 16 | verbs: 17 | - get 18 | - list 19 | - watch 20 | - apiGroups: 21 | - extensions 22 | resources: 23 | - ingresses 24 | verbs: 25 | - get 26 | - list 27 | - watch 28 | - apiGroups: 29 | - networking.k8s.io 30 | resources: 31 | - ingresses 32 | verbs: 33 | - get 34 | - list 35 | - watch 36 | {{- end }} 37 | -------------------------------------------------------------------------------- /charts/jobset/templates/prometheus/role_binding.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.prometheus.enable }} 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: RoleBinding 4 | metadata: 5 | name: {{ include "jobset.fullname" . }}-prometheus-k8s 6 | namespace: {{ .Release.Namespace }} 7 | labels: 8 | {{- include "jobset.controller.labels" . | nindent 4 }} 9 | roleRef: 10 | apiGroup: rbac.authorization.k8s.io 11 | kind: Role 12 | name: {{ include "jobset.fullname" . }}-prometheus-k8s 13 | subjects: 14 | - kind: ServiceAccount 15 | name: prometheus-k8s 16 | namespace: '{{ .Values.prometheus.prometheusNamespace }}' 17 | - kind: ServiceAccount 18 | name: prometheus-operator 19 | namespace: '{{ .Values.prometheus.prometheusNamespace }}' 20 | {{- end }} 21 | -------------------------------------------------------------------------------- /charts/jobset/templates/prometheus/service.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | apiVersion: v1 17 | kind: Service 18 | metadata: 19 | name: {{ include "jobset.metrics.service.name" . }} 20 | namespace: {{ .Release.Namespace}} 21 | labels: 22 | {{- include "jobset.controller.selectorLabels" . | nindent 4 }} 23 | spec: 24 | type: ClusterIP 25 | selector: 26 | {{- include "jobset.controller.selectorLabels" . | nindent 4 }} 27 | ports: 28 | - name: https 29 | port: 8443 30 | protocol: TCP 31 | targetPort: 8443 32 | -------------------------------------------------------------------------------- /charts/jobset/templates/webhook/secret.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | {{- if not .Values.certManager.enable }} 18 | apiVersion: v1 19 | kind: Secret 20 | metadata: 21 | name: {{ include "jobset.webhook.secret.name" . }} 22 | namespace: {{ .Release.Namespace }} 23 | labels: 24 | {{- include "jobset.webhook.labels" . | nindent 4 }} 25 | data: 26 | ca.crt: "" 27 | ca.key: "" 28 | tls.crt: "" 29 | tls.key: "" 30 | {{- end }} 31 | -------------------------------------------------------------------------------- /charts/jobset/templates/webhook/service.yaml: -------------------------------------------------------------------------------- 1 | {{- /* 2 | Copyright 2025 The Kubernetes authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | https://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -}} 16 | 17 | apiVersion: v1 18 | kind: Service 19 | metadata: 20 | name: {{ include "jobset.webhook.service.name" . }} 21 | labels: 22 | {{- include "jobset.webhook.labels" . | nindent 4 }} 23 | spec: 24 | type: ClusterIP 25 | selector: 26 | {{- include "jobset.selectorLabels" . | nindent 4 }} 27 | ports: 28 | - name: webhook 29 | protocol: TCP 30 | port: 443 31 | targetPort: webhook 32 | -------------------------------------------------------------------------------- /charts/jobset/tests/certmanager/issuer_test.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2025 The Kubernetes authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | suite: Test cert-manager Issuer 18 | 19 | templates: 20 | - certmanager/issuer.yaml 21 | 22 | release: 23 | name: jobset 24 | namespace: jobset-system 25 | 26 | tests: 27 | - it: Should create cert-manager Issuer resource if `certManager.enable` is `true` and `certManager.issuerRef` is `{}` 28 | set: 29 | certManager: 30 | enable: true 31 | asserts: 32 | - containsDocument: 33 | apiVersion: cert-manager.io/v1 34 | kind: Issuer 35 | name: jobset-self-signed-issuer 36 | -------------------------------------------------------------------------------- /charts/jobset/tests/prometheus/service_monitor_test.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2025 The Kubernetes authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | suite: Test Prometheus ServiceMonitor 18 | 19 | templates: 20 | - prometheus/service_monitor.yaml 21 | 22 | release: 23 | name: jobset 24 | namespace: jobset-system 25 | 26 | tests: 27 | - it: Should not create Prometheus ServiceMonitor by default 28 | asserts: 29 | - hasDocuments: 30 | count: 0 31 | 32 | - it: Should create Prometheus ServiceMonitor if `prometheus.enable` is `true` 33 | capabilities: 34 | apiVersions: 35 | - monitoring.coreos.com/v1/ServiceMonitor 36 | set: 37 | prometheus: 38 | enable: true 39 | asserts: 40 | - containsDocument: 41 | apiVersion: monitoring.coreos.com/v1 42 | kind: ServiceMonitor 43 | name: jobset-metrics-service-monitor 44 | 45 | - it: Should fail if the cluster does not support the required API resource `monitoring.coreos.com/v1/ServiceMonitor` 46 | set: 47 | prometheus: 48 | enable: true 49 | asserts: 50 | - failedTemplate: 51 | errorMessage: "The cluster does not support the required API resource `monitoring.coreos.com/v1/ServiceMonitor`." 52 | -------------------------------------------------------------------------------- /charts/jobset/tests/prometheus/service_test.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2025 The Kubernetes authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | suite: Test Prometheus Service 18 | 19 | templates: 20 | - prometheus/service.yaml 21 | 22 | release: 23 | name: jobset 24 | namespace: jobset-system 25 | 26 | tests: 27 | - it: Should create Prometheus Service by default 28 | set: 29 | prometheus: 30 | enable: true 31 | asserts: 32 | - containsDocument: 33 | apiVersion: v1 34 | kind: Service 35 | name: jobset-metrics-service 36 | -------------------------------------------------------------------------------- /charts/jobset/tests/webhook/secret_test.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2025 The Kubernetes authors. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # https://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | suite: Test webhook service 18 | 19 | templates: 20 | - webhook/service.yaml 21 | 22 | release: 23 | name: jobset 24 | namespace: jobset-system 25 | 26 | tests: 27 | - it: Should create webhook service by default 28 | asserts: 29 | - containsDocument: 30 | apiVersion: v1 31 | kind: Service 32 | name: jobset-webhook-service 33 | -------------------------------------------------------------------------------- /client-go/applyconfiguration/internal/internal.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by applyconfiguration-gen. DO NOT EDIT. 14 | 15 | package internal 16 | 17 | import ( 18 | fmt "fmt" 19 | sync "sync" 20 | 21 | typed "sigs.k8s.io/structured-merge-diff/v4/typed" 22 | ) 23 | 24 | func Parser() *typed.Parser { 25 | parserOnce.Do(func() { 26 | var err error 27 | parser, err = typed.NewParser(schemaYAML) 28 | if err != nil { 29 | panic(fmt.Sprintf("Failed to parse schema: %v", err)) 30 | } 31 | }) 32 | return parser 33 | } 34 | 35 | var parserOnce sync.Once 36 | var parser *typed.Parser 37 | var schemaYAML = typed.YAMLObject(`types: 38 | - name: __untyped_atomic_ 39 | scalar: untyped 40 | list: 41 | elementType: 42 | namedType: __untyped_atomic_ 43 | elementRelationship: atomic 44 | map: 45 | elementType: 46 | namedType: __untyped_atomic_ 47 | elementRelationship: atomic 48 | - name: __untyped_deduced_ 49 | scalar: untyped 50 | list: 51 | elementType: 52 | namedType: __untyped_atomic_ 53 | elementRelationship: atomic 54 | map: 55 | elementType: 56 | namedType: __untyped_deduced_ 57 | elementRelationship: separable 58 | `) 59 | -------------------------------------------------------------------------------- /client-go/clientset/versioned/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by client-gen. DO NOT EDIT. 14 | 15 | // This package has the automatically generated fake clientset. 16 | package fake 17 | -------------------------------------------------------------------------------- /client-go/clientset/versioned/scheme/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by client-gen. DO NOT EDIT. 14 | 15 | // This package contains the scheme of the automatically generated clientset. 16 | package scheme 17 | -------------------------------------------------------------------------------- /client-go/clientset/versioned/typed/jobset/v1alpha2/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by client-gen. DO NOT EDIT. 14 | 15 | // This package has the automatically generated typed clients. 16 | package v1alpha2 17 | -------------------------------------------------------------------------------- /client-go/clientset/versioned/typed/jobset/v1alpha2/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by client-gen. DO NOT EDIT. 14 | 15 | // Package fake has the automatically generated clients. 16 | package fake 17 | -------------------------------------------------------------------------------- /client-go/clientset/versioned/typed/jobset/v1alpha2/fake/fake_jobset_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by client-gen. DO NOT EDIT. 14 | 15 | package fake 16 | 17 | import ( 18 | rest "k8s.io/client-go/rest" 19 | testing "k8s.io/client-go/testing" 20 | v1alpha2 "sigs.k8s.io/jobset/client-go/clientset/versioned/typed/jobset/v1alpha2" 21 | ) 22 | 23 | type FakeJobsetV1alpha2 struct { 24 | *testing.Fake 25 | } 26 | 27 | func (c *FakeJobsetV1alpha2) JobSets(namespace string) v1alpha2.JobSetInterface { 28 | return newFakeJobSets(c, namespace) 29 | } 30 | 31 | // RESTClient returns a RESTClient that is used to communicate 32 | // with API server by this client implementation. 33 | func (c *FakeJobsetV1alpha2) RESTClient() rest.Interface { 34 | var ret *rest.RESTClient 35 | return ret 36 | } 37 | -------------------------------------------------------------------------------- /client-go/clientset/versioned/typed/jobset/v1alpha2/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by client-gen. DO NOT EDIT. 14 | 15 | package v1alpha2 16 | 17 | type JobSetExpansion interface{} 18 | -------------------------------------------------------------------------------- /client-go/informers/externalversions/internalinterfaces/factory_interfaces.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by informer-gen. DO NOT EDIT. 14 | 15 | package internalinterfaces 16 | 17 | import ( 18 | time "time" 19 | 20 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | runtime "k8s.io/apimachinery/pkg/runtime" 22 | cache "k8s.io/client-go/tools/cache" 23 | versioned "sigs.k8s.io/jobset/client-go/clientset/versioned" 24 | ) 25 | 26 | // NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. 27 | type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer 28 | 29 | // SharedInformerFactory a small interface to allow for adding an informer without an import cycle 30 | type SharedInformerFactory interface { 31 | Start(stopCh <-chan struct{}) 32 | InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer 33 | } 34 | 35 | // TweakListOptionsFunc is a function that transforms a v1.ListOptions. 36 | type TweakListOptionsFunc func(*v1.ListOptions) 37 | -------------------------------------------------------------------------------- /client-go/informers/externalversions/jobset/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by informer-gen. DO NOT EDIT. 14 | 15 | package jobset 16 | 17 | import ( 18 | internalinterfaces "sigs.k8s.io/jobset/client-go/informers/externalversions/internalinterfaces" 19 | v1alpha2 "sigs.k8s.io/jobset/client-go/informers/externalversions/jobset/v1alpha2" 20 | ) 21 | 22 | // Interface provides access to each of this group's versions. 23 | type Interface interface { 24 | // V1alpha2 provides access to shared informers for resources in V1alpha2. 25 | V1alpha2() v1alpha2.Interface 26 | } 27 | 28 | type group struct { 29 | factory internalinterfaces.SharedInformerFactory 30 | namespace string 31 | tweakListOptions internalinterfaces.TweakListOptionsFunc 32 | } 33 | 34 | // New returns a new Interface. 35 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 36 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 37 | } 38 | 39 | // V1alpha2 returns a new v1alpha2.Interface. 40 | func (g *group) V1alpha2() v1alpha2.Interface { 41 | return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions) 42 | } 43 | -------------------------------------------------------------------------------- /client-go/informers/externalversions/jobset/v1alpha2/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by informer-gen. DO NOT EDIT. 14 | 15 | package v1alpha2 16 | 17 | import ( 18 | internalinterfaces "sigs.k8s.io/jobset/client-go/informers/externalversions/internalinterfaces" 19 | ) 20 | 21 | // Interface provides access to all the informers in this group version. 22 | type Interface interface { 23 | // JobSets returns a JobSetInformer. 24 | JobSets() JobSetInformer 25 | } 26 | 27 | type version struct { 28 | factory internalinterfaces.SharedInformerFactory 29 | namespace string 30 | tweakListOptions internalinterfaces.TweakListOptionsFunc 31 | } 32 | 33 | // New returns a new Interface. 34 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 35 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 36 | } 37 | 38 | // JobSets returns a JobSetInformer. 39 | func (v *version) JobSets() JobSetInformer { 40 | return &jobSetInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 41 | } 42 | -------------------------------------------------------------------------------- /client-go/listers/jobset/v1alpha2/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | // Code generated by lister-gen. DO NOT EDIT. 14 | 15 | package v1alpha2 16 | 17 | // JobSetListerExpansion allows custom methods to be added to 18 | // JobSetLister. 19 | type JobSetListerExpansion interface{} 20 | 21 | // JobSetNamespaceListerExpansion allows custom methods to be added to 22 | // JobSetNamespaceLister. 23 | type JobSetNamespaceListerExpansion interface{} 24 | -------------------------------------------------------------------------------- /cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # See https://cloud.google.com/cloud-build/docs/build-config 2 | timeout: 3000s 3 | # A build step specifies an action that you want Prow to perform. 4 | # For each build step, Prow executes a job. 5 | steps: 6 | # see https://github.com/kubernetes/test-infra/tree/master/config/jobs/image-pushing 7 | - name: 'gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20240718-5ef92b5c36' 8 | entrypoint: make 9 | args: 10 | - image-push 11 | - helm-chart-push 12 | env: 13 | - IMAGE_REGISTRY=us-central1-docker.pkg.dev/k8s-staging-images/jobset 14 | - GIT_TAG=$_GIT_TAG 15 | - EXTRA_TAG=$_PULL_BASE_REF 16 | - DOCKER_BUILDX_CMD=/buildx-entrypoint 17 | - GOTOOLCHAIN=auto 18 | substitutions: 19 | # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and 20 | # can be used as a substitution 21 | _GIT_TAG: '0.0.0' 22 | # _PULL_BASE_REF will contain the ref that was pushed to trigger this build - 23 | # a branch like 'main' or 'release-0.2', or a tag like 'v0.2'. 24 | _PULL_BASE_REF: 'main' 25 | options: 26 | substitution_option: ALLOW_LOOSE 27 | -------------------------------------------------------------------------------- /code-of-conduct.md: -------------------------------------------------------------------------------- 1 | # Kubernetes Community Code of Conduct 2 | 3 | Please refer to our [Kubernetes Community Code of Conduct](https://git.k8s.io/community/code-of-conduct.md) 4 | -------------------------------------------------------------------------------- /config/components/certmanager/certificate.yaml: -------------------------------------------------------------------------------- 1 | # The following manifests contain a self-signed issuer CR and a certificate CR. 2 | # More document can be found at https://docs.cert-manager.io 3 | # WARNING: Targets CertManager v1.0. Check https://cert-manager.io/docs/installation/upgrading/ for breaking changes. 4 | apiVersion: cert-manager.io/v1 5 | kind: Issuer 6 | metadata: 7 | labels: 8 | app.kubernetes.io/name: issuer 9 | app.kubernetes.io/instance: selfsigned-issuer 10 | app.kubernetes.io/component: certificate 11 | app.kubernetes.io/created-by: jobset 12 | app.kubernetes.io/part-of: jobset 13 | app.kubernetes.io/managed-by: kustomize 14 | name: selfsigned-issuer 15 | namespace: system 16 | spec: 17 | selfSigned: {} 18 | --- 19 | apiVersion: cert-manager.io/v1 20 | kind: Certificate 21 | metadata: 22 | labels: 23 | app.kubernetes.io/name: certificate 24 | app.kubernetes.io/instance: serving-cert 25 | app.kubernetes.io/component: certificate 26 | app.kubernetes.io/created-by: jobset 27 | app.kubernetes.io/part-of: jobset 28 | app.kubernetes.io/managed-by: kustomize 29 | name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml 30 | namespace: system 31 | spec: 32 | # $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize 33 | dnsNames: 34 | - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc 35 | - $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local 36 | commonName: jobset-webhook 37 | duration: 8760h 38 | renewBefore: 720h 39 | usages: 40 | - server auth 41 | - client auth 42 | issuerRef: 43 | kind: Issuer 44 | name: selfsigned-issuer 45 | secretName: webhook-server-cert # this secret will not be prefixed, since it's not managed by kustomize 46 | -------------------------------------------------------------------------------- /config/components/certmanager/certificate_metrics.yaml: -------------------------------------------------------------------------------- 1 | # The following manifests contain a certificate CR. 2 | # More document can be found at https://docs.cert-manager.io 3 | apiVersion: cert-manager.io/v1 4 | kind: Certificate 5 | metadata: 6 | labels: 7 | app.kubernetes.io/name: certificate 8 | app.kubernetes.io/instance: metrics-cert 9 | app.kubernetes.io/component: certificate 10 | app.kubernetes.io/created-by: jobset 11 | app.kubernetes.io/part-of: jobset 12 | app.kubernetes.io/managed-by: kustomize 13 | name: metrics-cert # this name should match the one appeared in kustomizeconfig.yaml 14 | namespace: system 15 | spec: 16 | # METRICS_SERVICE_NAME and METRICS_SERVICE_NAMESPACE will be substituted by kustomize 17 | dnsNames: 18 | - $(METRICS_SERVICE_NAME).$(METRICS_SERVICE_NAMESPACE).svc 19 | - $(METRICS_SERVICE_NAME).$(METRICS_SERVICE_NAMESPACE).svc.cluster.local 20 | commonName: jobset-metrics 21 | duration: 8760h 22 | renewBefore: 720h 23 | usages: 24 | - server auth 25 | - client auth 26 | issuerRef: 27 | kind: Issuer 28 | name: selfsigned-issuer 29 | secretName: metrics-server-cert # this secret will not be prefixed, since it's not managed by kustomize 30 | -------------------------------------------------------------------------------- /config/components/certmanager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - certificate.yaml 3 | - certificate_metrics.yaml 4 | 5 | configurations: 6 | - kustomizeconfig.yaml 7 | -------------------------------------------------------------------------------- /config/components/certmanager/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This configuration is for teaching kustomize how to update name ref and var substitution 2 | nameReference: 3 | - kind: Issuer 4 | group: cert-manager.io 5 | fieldSpecs: 6 | - kind: Certificate 7 | group: cert-manager.io 8 | path: spec/issuerRef/name 9 | 10 | varReference: 11 | - kind: Certificate 12 | group: cert-manager.io 13 | path: spec/dnsNames 14 | -------------------------------------------------------------------------------- /config/components/crd/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # This kustomization.yaml is not intended to be run by itself, 2 | # since it depends on service name and namespace that are out of this kustomize package. 3 | # It should be run by config/default 4 | resources: 5 | - bases/jobset.x-k8s.io_jobsets.yaml 6 | #+kubebuilder:scaffold:crdkustomizeresource 7 | 8 | patches: 9 | # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. 10 | # patches here are for enabling the conversion webhook for each CRD 11 | - path: patches/webhook_in_jobsets.yaml 12 | #+kubebuilder:scaffold:crdkustomizewebhookpatch 13 | 14 | # [CERTMANAGER] To enable cert-manager, uncomment all the sections with [CERTMANAGER] prefix. 15 | # patches here are for enabling the CA injection for each CRD 16 | - path: patches/cainjection_in_jobsets.yaml 17 | #+kubebuilder:scaffold:crdkustomizecainjectionpatch 18 | 19 | # the following config is for teaching kustomize how to do kustomization for CRDs. 20 | configurations: 21 | - kustomizeconfig.yaml 22 | -------------------------------------------------------------------------------- /config/components/crd/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This file is for teaching kustomize how to substitute name and namespace reference in CRD 2 | nameReference: 3 | - kind: Service 4 | version: v1 5 | fieldSpecs: 6 | - kind: CustomResourceDefinition 7 | version: v1 8 | group: apiextensions.k8s.io 9 | path: spec/conversion/webhook/clientConfig/service/name 10 | 11 | namespace: 12 | - kind: CustomResourceDefinition 13 | version: v1 14 | group: apiextensions.k8s.io 15 | path: spec/conversion/webhook/clientConfig/service/namespace 16 | create: false 17 | 18 | varReference: 19 | - path: metadata/annotations 20 | -------------------------------------------------------------------------------- /config/components/crd/patches/cainjection_in_jobsets.yaml: -------------------------------------------------------------------------------- 1 | # The following patch adds a directive for certmanager to inject CA into the CRD 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | annotations: 6 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 7 | name: jobsets.jobset.x-k8s.io 8 | -------------------------------------------------------------------------------- /config/components/crd/patches/webhook_in_jobsets.yaml: -------------------------------------------------------------------------------- 1 | # The following patch enables a conversion webhook for the CRD 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | name: jobsets.jobset.x-k8s.io 6 | spec: 7 | conversion: 8 | strategy: Webhook 9 | webhook: 10 | clientConfig: 11 | service: 12 | namespace: system 13 | name: webhook-service 14 | path: /convert 15 | conversionReviewVersions: 16 | - v1 17 | -------------------------------------------------------------------------------- /config/components/internalcert/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - secret.yaml -------------------------------------------------------------------------------- /config/components/internalcert/secret.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Secret 3 | metadata: 4 | name: webhook-server-cert 5 | namespace: system -------------------------------------------------------------------------------- /config/components/manager/controller_manager_config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: config.jobset.x-k8s.io/v1alpha1 2 | kind: Configuration 3 | leaderElection: 4 | leaderElect: true 5 | internalCertManagement: 6 | enable: true 7 | -------------------------------------------------------------------------------- /config/components/manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manager.yaml 3 | 4 | generatorOptions: 5 | disableNameSuffixHash: true 6 | 7 | configMapGenerator: 8 | - files: 9 | - controller_manager_config.yaml 10 | name: manager-config 11 | 12 | apiVersion: kustomize.config.k8s.io/v1beta1 13 | kind: Kustomization 14 | images: 15 | - name: controller 16 | newName: us-central1-docker.pkg.dev/k8s-staging-images/jobset/jobset 17 | newTag: main 18 | -------------------------------------------------------------------------------- /config/components/prometheus/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - monitor.yaml 3 | - role.yaml 4 | 5 | # [PROMETHEUS WITH CERTMANAGER] The following patch configures the ServiceMonitor in ../prometheus 6 | # to securely reference certificates created and managed by cert-manager. 7 | # Ensure correct reference are set in the monitor_tls_patch.yaml file: 8 | # METRICS_SERVICE_NAME (e.g. jobset-controller-manager-metrics-service.jobset-system.svc), 9 | # and ${METRICS_PROMETHEUS_CLIENT_CERT_SECRET_NAME} (e.g. metrics-server-cert). 10 | # Additionally 11 | # - ensure that you uncomment the [METRICS WITH CERTMANAGER] patch under config/default/kustomization.yaml 12 | # to mount the "metrics-server-cert" secret in the Manager Deployment. 13 | # - ensure that you uncomment the [METRICS WITH CERTMANAGER] patch under config/certmanager/kustomization.yaml 14 | # to enable certmanager for metrics. 15 | # - ensure prometheus RoleBinding in ./role.yaml references a correct namespace 16 | #patches: 17 | # - path: monitor_tls_patch.yaml 18 | # target: 19 | # kind: ServiceMonitor 20 | -------------------------------------------------------------------------------- /config/components/prometheus/monitor.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Prometheus Monitor Service (Metrics) 3 | apiVersion: monitoring.coreos.com/v1 4 | kind: ServiceMonitor 5 | metadata: 6 | labels: 7 | control-plane: controller-manager 8 | app.kubernetes.io/name: servicemonitor 9 | app.kubernetes.io/instance: controller-manager-metrics-monitor 10 | app.kubernetes.io/component: metrics 11 | app.kubernetes.io/created-by: jobset 12 | app.kubernetes.io/part-of: jobset 13 | app.kubernetes.io/managed-by: kustomize 14 | name: controller-manager-metrics-monitor 15 | namespace: system 16 | spec: 17 | endpoints: 18 | - path: /metrics 19 | port: https 20 | scheme: https 21 | bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token 22 | tlsConfig: 23 | insecureSkipVerify: true 24 | selector: 25 | matchLabels: 26 | control-plane: controller-manager 27 | -------------------------------------------------------------------------------- /config/components/prometheus/monitor_tls_patch.yaml: -------------------------------------------------------------------------------- 1 | # Patch for Prometheus ServiceMonitor to enable secure TLS configuration 2 | # using certificates managed by cert-manager 3 | # 4 | # [PROMETHEUS WITH CERTMANAGER] 5 | # ${METRICS_PROMETHEUS_CLIENT_CERT_SECRET_NAME} should be replaced with a prometheus client secret. 6 | # The same certificate for the server ("metrics-server-cert") can potentially be also used for the client. 7 | # It is preferable to use prometheus client certificate if available: 8 | # Either by creating a secret in the jobset controller namespace 9 | # or by using prometheus mounted secret which can be configured via certFile and keyFile in the service_monitor.yaml 10 | apiVersion: monitoring.coreos.com/v1 11 | kind: ServiceMonitor 12 | metadata: 13 | name: controller-manager-metrics-monitor 14 | namespace: system 15 | spec: 16 | endpoints: 17 | - path: /metrics 18 | port: https 19 | scheme: https 20 | bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token 21 | tlsConfig: 22 | insecureSkipVerify: false 23 | serverName: ${METRICS_SERVICE_NAME}.${METRICS_SERVICE_NAMESPACE}.svc 24 | ca: 25 | secret: 26 | name: metrics-server-cert 27 | key: ca.crt 28 | cert: 29 | secret: 30 | name: ${METRICS_PROMETHEUS_CLIENT_CERT_SECRET_NAME} 31 | key: tls.crt 32 | keySecret: 33 | name: ${METRICS_PROMETHEUS_CLIENT_CERT_SECRET_NAME} 34 | key: tls.key 35 | -------------------------------------------------------------------------------- /config/components/prometheus/role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: Role 3 | metadata: 4 | name: prometheus-k8s 5 | namespace: system 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - services 11 | - endpoints 12 | - pods 13 | verbs: 14 | - get 15 | - list 16 | - watch 17 | - apiGroups: 18 | - extensions 19 | resources: 20 | - ingresses 21 | verbs: 22 | - get 23 | - list 24 | - watch 25 | - apiGroups: 26 | - networking.k8s.io 27 | resources: 28 | - ingresses 29 | verbs: 30 | - get 31 | - list 32 | - watch 33 | --- 34 | apiVersion: rbac.authorization.k8s.io/v1 35 | kind: RoleBinding 36 | metadata: 37 | name: prometheus-k8s 38 | namespace: system 39 | roleRef: 40 | apiGroup: rbac.authorization.k8s.io 41 | kind: Role 42 | name: prometheus-k8s 43 | subjects: 44 | - kind: ServiceAccount 45 | name: prometheus-k8s 46 | namespace: monitoring 47 | - kind: ServiceAccount 48 | name: prometheus-operator 49 | namespace: monitoring -------------------------------------------------------------------------------- /config/components/rbac/auth_proxy_client_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | name: metrics-reader-rolebinding 5 | roleRef: 6 | apiGroup: rbac.authorization.k8s.io 7 | kind: ClusterRole 8 | name: metrics-reader 9 | subjects: 10 | - kind: ServiceAccount 11 | name: controller-manager 12 | namespace: system -------------------------------------------------------------------------------- /config/components/rbac/auth_proxy_client_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: clusterrole 6 | app.kubernetes.io/instance: metrics-reader 7 | app.kubernetes.io/created-by: jobset 8 | app.kubernetes.io/part-of: jobset 9 | app.kubernetes.io/managed-by: kustomize 10 | name: metrics-reader 11 | rules: 12 | - nonResourceURLs: 13 | - "/metrics" 14 | verbs: 15 | - get 16 | -------------------------------------------------------------------------------- /config/components/rbac/auth_proxy_role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: clusterrole 6 | app.kubernetes.io/instance: proxy-role 7 | app.kubernetes.io/created-by: jobset 8 | app.kubernetes.io/part-of: jobset 9 | app.kubernetes.io/managed-by: kustomize 10 | name: proxy-role 11 | rules: 12 | - apiGroups: 13 | - authentication.k8s.io 14 | resources: 15 | - tokenreviews 16 | verbs: 17 | - create 18 | - apiGroups: 19 | - authorization.k8s.io 20 | resources: 21 | - subjectaccessreviews 22 | verbs: 23 | - create 24 | -------------------------------------------------------------------------------- /config/components/rbac/auth_proxy_role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: clusterrolebinding 6 | app.kubernetes.io/instance: proxy-rolebinding 7 | app.kubernetes.io/created-by: jobset 8 | app.kubernetes.io/part-of: jobset 9 | app.kubernetes.io/managed-by: kustomize 10 | name: proxy-rolebinding 11 | roleRef: 12 | apiGroup: rbac.authorization.k8s.io 13 | kind: ClusterRole 14 | name: proxy-role 15 | subjects: 16 | - kind: ServiceAccount 17 | name: controller-manager 18 | namespace: system 19 | -------------------------------------------------------------------------------- /config/components/rbac/jobset_editor_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to edit jobsets. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: clusterrole 7 | app.kubernetes.io/instance: jobset-editor-role 8 | app.kubernetes.io/component: rbac 9 | app.kubernetes.io/created-by: jobset 10 | app.kubernetes.io/part-of: jobset 11 | app.kubernetes.io/managed-by: kustomize 12 | name: jobset-editor-role 13 | rules: 14 | - apiGroups: 15 | - jobset.x-k8s.io 16 | resources: 17 | - jobsets 18 | verbs: 19 | - create 20 | - delete 21 | - get 22 | - list 23 | - patch 24 | - update 25 | - watch 26 | - apiGroups: 27 | - jobset.x-k8s.io 28 | resources: 29 | - jobsets/status 30 | verbs: 31 | - get 32 | -------------------------------------------------------------------------------- /config/components/rbac/jobset_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions for end users to view jobsets. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: clusterrole 7 | app.kubernetes.io/instance: jobset-viewer-role 8 | app.kubernetes.io/component: rbac 9 | app.kubernetes.io/created-by: jobset 10 | app.kubernetes.io/part-of: jobset 11 | app.kubernetes.io/managed-by: kustomize 12 | name: jobset-viewer-role 13 | rules: 14 | - apiGroups: 15 | - jobset.x-k8s.io 16 | resources: 17 | - jobsets 18 | verbs: 19 | - get 20 | - list 21 | - watch 22 | - apiGroups: 23 | - jobset.x-k8s.io 24 | resources: 25 | - jobsets/status 26 | verbs: 27 | - get 28 | -------------------------------------------------------------------------------- /config/components/rbac/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | # All RBAC will be applied under this service account in 3 | # the deployment namespace. You may comment out this resource 4 | # if your manager will use a service account that exists at 5 | # runtime. Be sure to update RoleBinding and ClusterRoleBinding 6 | # subjects if changing service account names. 7 | - service_account.yaml 8 | - role.yaml 9 | - role_binding.yaml 10 | - leader_election_role.yaml 11 | - leader_election_role_binding.yaml 12 | # Comment the following 4 lines if you want to disable 13 | # protecting your /metrics endpoint. 14 | - auth_proxy_role.yaml 15 | - auth_proxy_role_binding.yaml 16 | - auth_proxy_client_clusterrole.yaml 17 | - auth_proxy_client_binding.yaml 18 | -------------------------------------------------------------------------------- /config/components/rbac/leader_election_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions to do leader election. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: role 7 | app.kubernetes.io/instance: leader-election-role 8 | app.kubernetes.io/component: rbac 9 | app.kubernetes.io/created-by: jobset 10 | app.kubernetes.io/part-of: jobset 11 | app.kubernetes.io/managed-by: kustomize 12 | name: leader-election-role 13 | rules: 14 | - apiGroups: 15 | - "" 16 | resources: 17 | - configmaps 18 | verbs: 19 | - get 20 | - list 21 | - watch 22 | - create 23 | - update 24 | - patch 25 | - delete 26 | - apiGroups: 27 | - coordination.k8s.io 28 | resources: 29 | - leases 30 | verbs: 31 | - get 32 | - list 33 | - watch 34 | - create 35 | - update 36 | - patch 37 | - delete 38 | - apiGroups: 39 | - "" 40 | resources: 41 | - events 42 | verbs: 43 | - create 44 | - patch 45 | -------------------------------------------------------------------------------- /config/components/rbac/leader_election_role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: rolebinding 6 | app.kubernetes.io/instance: leader-election-rolebinding 7 | app.kubernetes.io/component: rbac 8 | app.kubernetes.io/created-by: jobset 9 | app.kubernetes.io/part-of: jobset 10 | app.kubernetes.io/managed-by: kustomize 11 | name: leader-election-rolebinding 12 | roleRef: 13 | apiGroup: rbac.authorization.k8s.io 14 | kind: Role 15 | name: leader-election-role 16 | subjects: 17 | - kind: ServiceAccount 18 | name: controller-manager 19 | namespace: system 20 | -------------------------------------------------------------------------------- /config/components/rbac/role.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: ClusterRole 4 | metadata: 5 | name: manager-role 6 | rules: 7 | - apiGroups: 8 | - "" 9 | resources: 10 | - events 11 | verbs: 12 | - create 13 | - patch 14 | - update 15 | - watch 16 | - apiGroups: 17 | - "" 18 | resources: 19 | - nodes 20 | verbs: 21 | - get 22 | - list 23 | - watch 24 | - apiGroups: 25 | - "" 26 | resources: 27 | - pods 28 | - services 29 | verbs: 30 | - create 31 | - delete 32 | - get 33 | - list 34 | - patch 35 | - update 36 | - watch 37 | - apiGroups: 38 | - "" 39 | resources: 40 | - secrets 41 | verbs: 42 | - get 43 | - list 44 | - update 45 | - watch 46 | - apiGroups: 47 | - admissionregistration.k8s.io 48 | resources: 49 | - mutatingwebhookconfigurations 50 | - validatingwebhookconfigurations 51 | verbs: 52 | - get 53 | - list 54 | - update 55 | - watch 56 | - apiGroups: 57 | - batch 58 | resources: 59 | - jobs 60 | verbs: 61 | - create 62 | - delete 63 | - get 64 | - list 65 | - patch 66 | - update 67 | - watch 68 | - apiGroups: 69 | - batch 70 | resources: 71 | - jobs/status 72 | verbs: 73 | - get 74 | - patch 75 | - update 76 | - apiGroups: 77 | - jobset.x-k8s.io 78 | resources: 79 | - jobsets 80 | verbs: 81 | - create 82 | - delete 83 | - get 84 | - list 85 | - patch 86 | - update 87 | - watch 88 | - apiGroups: 89 | - jobset.x-k8s.io 90 | resources: 91 | - jobsets/finalizers 92 | verbs: 93 | - update 94 | - apiGroups: 95 | - jobset.x-k8s.io 96 | resources: 97 | - jobsets/status 98 | verbs: 99 | - get 100 | - patch 101 | - update 102 | -------------------------------------------------------------------------------- /config/components/rbac/role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: clusterrolebinding 6 | app.kubernetes.io/instance: manager-rolebinding 7 | app.kubernetes.io/component: rbac 8 | app.kubernetes.io/created-by: jobset 9 | app.kubernetes.io/part-of: jobset 10 | app.kubernetes.io/managed-by: kustomize 11 | name: manager-rolebinding 12 | roleRef: 13 | apiGroup: rbac.authorization.k8s.io 14 | kind: ClusterRole 15 | name: manager-role 16 | subjects: 17 | - kind: ServiceAccount 18 | name: controller-manager 19 | namespace: system 20 | -------------------------------------------------------------------------------- /config/components/rbac/service_account.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: serviceaccount 6 | app.kubernetes.io/instance: controller-manager 7 | app.kubernetes.io/component: rbac 8 | app.kubernetes.io/created-by: jobset 9 | app.kubernetes.io/part-of: jobset 10 | app.kubernetes.io/managed-by: kustomize 11 | name: controller-manager 12 | namespace: system 13 | -------------------------------------------------------------------------------- /config/components/webhook/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manifests.yaml 3 | - service.yaml 4 | 5 | configurations: 6 | - kustomizeconfig.yaml 7 | 8 | patches: 9 | - path: patches/mutating-patch.yaml 10 | target: 11 | group: admissionregistration.k8s.io 12 | version: v1 13 | kind: MutatingWebhookConfiguration 14 | name: mutating-webhook-configuration 15 | - path: patches/validating-patch.yaml 16 | target: 17 | group: admissionregistration.k8s.io 18 | version: v1 19 | kind: ValidatingWebhookConfiguration 20 | name: validating-webhook-configuration -------------------------------------------------------------------------------- /config/components/webhook/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # the following config is for teaching kustomize where to look at when substituting vars. 2 | # It requires kustomize v2.1.0 or newer to work properly. 3 | nameReference: 4 | - kind: Service 5 | version: v1 6 | fieldSpecs: 7 | - kind: MutatingWebhookConfiguration 8 | group: admissionregistration.k8s.io 9 | path: webhooks/clientConfig/service/name 10 | - kind: ValidatingWebhookConfiguration 11 | group: admissionregistration.k8s.io 12 | path: webhooks/clientConfig/service/name 13 | 14 | namespace: 15 | - kind: MutatingWebhookConfiguration 16 | group: admissionregistration.k8s.io 17 | path: webhooks/clientConfig/service/namespace 18 | create: true 19 | - kind: ValidatingWebhookConfiguration 20 | group: admissionregistration.k8s.io 21 | path: webhooks/clientConfig/service/namespace 22 | create: true 23 | 24 | varReference: 25 | - path: metadata/annotations 26 | -------------------------------------------------------------------------------- /config/components/webhook/patches/mutating-patch.yaml: -------------------------------------------------------------------------------- 1 | - op: replace 2 | path: /webhooks/1 3 | value: 4 | admissionReviewVersions: 5 | - v1 6 | clientConfig: 7 | service: 8 | name: webhook-service 9 | namespace: system 10 | path: /mutate--v1-pod 11 | failurePolicy: Fail 12 | name: mpod.kb.io 13 | objectSelector: 14 | matchExpressions: 15 | - key: jobset.sigs.k8s.io/jobset-name 16 | operator: Exists 17 | rules: 18 | - apiGroups: 19 | - "" 20 | apiVersions: 21 | - v1 22 | operations: 23 | - CREATE 24 | resources: 25 | - pods 26 | sideEffects: None 27 | -------------------------------------------------------------------------------- /config/components/webhook/patches/validating-patch.yaml: -------------------------------------------------------------------------------- 1 | - op: replace 2 | path: /webhooks/1 3 | value: 4 | admissionReviewVersions: 5 | - v1 6 | clientConfig: 7 | service: 8 | name: webhook-service 9 | namespace: system 10 | path: /validate--v1-pod 11 | failurePolicy: Fail 12 | name: vpod.kb.io 13 | objectSelector: 14 | matchExpressions: 15 | - key: jobset.sigs.k8s.io/jobset-name 16 | operator: Exists 17 | rules: 18 | - apiGroups: 19 | - "" 20 | apiVersions: 21 | - v1 22 | operations: 23 | - CREATE 24 | resources: 25 | - pods 26 | sideEffects: None 27 | -------------------------------------------------------------------------------- /config/components/webhook/service.yaml: -------------------------------------------------------------------------------- 1 | 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: service 7 | app.kubernetes.io/instance: webhook-service 8 | app.kubernetes.io/component: webhook 9 | app.kubernetes.io/created-by: jobset 10 | app.kubernetes.io/part-of: jobset 11 | app.kubernetes.io/managed-by: kustomize 12 | name: webhook-service 13 | namespace: system 14 | spec: 15 | ports: 16 | - port: 443 17 | protocol: TCP 18 | targetPort: 9443 19 | selector: 20 | control-plane: controller-manager 21 | -------------------------------------------------------------------------------- /config/default/certmanager_metrics_manager_patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: controller-manager 5 | namespace: system 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: manager 11 | volumeMounts: 12 | - mountPath: /tmp/k8s-metrics-server/serving-certs 13 | name: metrics-certs 14 | readOnly: true 15 | volumes: 16 | - name: metrics-certs 17 | secret: 18 | defaultMode: 420 19 | secretName: metrics-server-cert 20 | -------------------------------------------------------------------------------- /config/default/manager_config_patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: controller-manager 5 | namespace: system 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: manager 11 | args: 12 | - "--config=/controller_manager_config.yaml" 13 | - "--zap-log-level=2" 14 | volumeMounts: 15 | - name: manager-config 16 | mountPath: /controller_manager_config.yaml 17 | subPath: controller_manager_config.yaml 18 | volumes: 19 | - name: manager-config 20 | configMap: 21 | name: manager-config 22 | -------------------------------------------------------------------------------- /config/default/manager_metrics_patch.yaml: -------------------------------------------------------------------------------- 1 | # This patch exposes 8443 port used by metrics service 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: controller-manager 6 | namespace: system 7 | spec: 8 | template: 9 | spec: 10 | containers: 11 | - name: manager 12 | ports: 13 | - containerPort: 8443 14 | name: metrics 15 | protocol: TCP 16 | -------------------------------------------------------------------------------- /config/default/manager_metrics_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | control-plane: controller-manager 6 | app.kubernetes.io/name: jobset 7 | app.kubernetes.io/managed-by: kustomize 8 | name: controller-manager-metrics-service 9 | namespace: system 10 | spec: 11 | ports: 12 | - name: https 13 | port: 8443 14 | protocol: TCP 15 | targetPort: 8443 16 | selector: 17 | control-plane: controller-manager -------------------------------------------------------------------------------- /config/default/manager_webhook_patch.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: controller-manager 5 | namespace: system 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: manager 11 | ports: 12 | - containerPort: 9443 13 | name: webhook-server 14 | protocol: TCP 15 | volumeMounts: 16 | - mountPath: /tmp/k8s-webhook-server/serving-certs 17 | name: cert 18 | readOnly: true 19 | volumes: 20 | - name: cert 21 | secret: 22 | defaultMode: 420 23 | secretName: webhook-server-cert 24 | -------------------------------------------------------------------------------- /config/default/webhookcainjection_patch.yaml: -------------------------------------------------------------------------------- 1 | # This patch add annotation to admission webhook config and 2 | # the variables $(CERTIFICATE_NAMESPACE) and $(CERTIFICATE_NAME) will be substituted by kustomize. 3 | apiVersion: admissionregistration.k8s.io/v1 4 | kind: MutatingWebhookConfiguration 5 | metadata: 6 | labels: 7 | app.kubernetes.io/name: mutatingwebhookconfiguration 8 | app.kubernetes.io/instance: mutating-webhook-configuration 9 | app.kubernetes.io/component: webhook 10 | app.kubernetes.io/created-by: jobset 11 | app.kubernetes.io/part-of: jobset 12 | app.kubernetes.io/managed-by: kustomize 13 | name: mutating-webhook-configuration 14 | annotations: 15 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 16 | --- 17 | apiVersion: admissionregistration.k8s.io/v1 18 | kind: ValidatingWebhookConfiguration 19 | metadata: 20 | labels: 21 | app.kubernetes.io/name: validatingwebhookconfiguration 22 | app.kubernetes.io/instance: validating-webhook-configuration 23 | app.kubernetes.io/component: webhook 24 | app.kubernetes.io/created-by: jobset 25 | app.kubernetes.io/part-of: jobset 26 | app.kubernetes.io/managed-by: kustomize 27 | name: validating-webhook-configuration 28 | annotations: 29 | cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME) 30 | -------------------------------------------------------------------------------- /config/prometheus/kustomization.yaml: -------------------------------------------------------------------------------- 1 | 2 | # This overlay builds the prometheus component to be used in combination 3 | # with other overlays. 4 | 5 | namespace: jobset-system 6 | resources: 7 | - ../components/prometheus -------------------------------------------------------------------------------- /config/samples/batch_v1alpha2_jobset.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: jobset 6 | app.kubernetes.io/instance: jobset-sample 7 | app.kubernetes.io/part-of: jobset 8 | app.kubernetes.io/managed-by: kustomize 9 | app.kubernetes.io/created-by: jobset 10 | name: jobset-sample 11 | spec: 12 | # TODO(user): Add fields here -------------------------------------------------------------------------------- /config/samples/jobset_v1alpha1_configuration.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha1 2 | kind: Configuration 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: configuration 6 | app.kubernetes.io/instance: configuration-sample 7 | app.kubernetes.io/part-of: jobset 8 | app.kubernetes.io/managed-by: kustomize 9 | app.kubernetes.io/created-by: jobset 10 | name: configuration-sample 11 | spec: 12 | # TODO(user): Add fields here 13 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # JobSet documentation 2 | 3 | Welcome to JobSet! 4 | 5 | JobSet Documentation is available on [jobset.sigs.k8s.io](https://jobset.sigs.k8s.io). 6 | -------------------------------------------------------------------------------- /examples: -------------------------------------------------------------------------------- 1 | ./site/static/examples -------------------------------------------------------------------------------- /hack/.notableofcontents: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/hack/.notableofcontents -------------------------------------------------------------------------------- /hack/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ -------------------------------------------------------------------------------- /hack/genref/config.yaml: -------------------------------------------------------------------------------- 1 | # more details can be found https://github.com/kubernetes-sigs/reference-docs/tree/master/genref 2 | hiddenMemberFields: 3 | - "TypeMeta" 4 | - "ObjectMeta" 5 | 6 | apis: 7 | - name: jobset 8 | title: JobSet API 9 | package: sigs.k8s.io/jobset 10 | path: api/jobset/v1alpha2 11 | 12 | externalPackages: 13 | - match: ^k8s\.io/(api|apimachinery/pkg/apis)/ 14 | target: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#{{- lower .TypeIdentifier -}}-{{- arrIndex .PackageSegments -1 -}}-{{- arrIndex .PackageSegments -2 -}} 15 | - match: ^k8s\.io/apimachinery/pkg/api/resource\.Quantity$ 16 | target: https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Quantity 17 | - match: ^k8s.io/component-base/config/v1alpha1. 18 | target: https://pkg.go.dev/k8s.io/component-base/config/v1alpha1#{{- .TypeIdentifier -}} 19 | - match: ^time\.Duration$ 20 | target: https://pkg.go.dev/time#Duration 21 | -------------------------------------------------------------------------------- /hack/genref/markdown/members.tpl: -------------------------------------------------------------------------------- 1 | {{ define "members" }} 2 | {{/* . is a apiType */}} 3 | {{- range .GetMembers -}} 4 | {{/* . is a apiMember */}} 5 | {{- if not .Hidden }} 6 | {{ .FieldName }} 7 | {{- if not .IsOptional }} [Required]{{- end -}} 8 |
9 | {{/* Link for type reference */}} 10 | {{- with .GetType -}} 11 | {{- if .Link -}} 12 | {{ .DisplayName }} 13 | {{- else -}} 14 | {{ .DisplayName }} 15 | {{- end -}} 16 | {{- end }} 17 | 18 | 19 | {{- if .IsInline -}} 20 | (Members of {{ .FieldName }} are embedded into this type.) 21 | {{- end }} 22 | {{ if .GetComment -}} 23 | {{ .GetComment }} 24 | {{- else -}} 25 | No description provided. 26 | {{- end }} 27 | {{- if and (eq (.GetType.Name.Name) "ObjectMeta") -}} 28 | Refer to the Kubernetes API documentation for the fields of the metadata field. 29 | {{- end -}} 30 | 31 | 32 | {{- end }} 33 | {{- end }} 34 | {{ end }} 35 | -------------------------------------------------------------------------------- /hack/genref/markdown/pkg.tpl: -------------------------------------------------------------------------------- 1 | {{ define "packages" -}} 2 | 3 | {{- range $idx, $val := .packages -}} 4 | {{/* Special handling for config */}} 5 | {{- if .IsMain -}} 6 | --- 7 | title: {{ .Title }} 8 | content_type: tool-reference 9 | package: {{ .DisplayName }} 10 | auto_generated: true 11 | description: Generated API reference documentation for {{ .DisplayName }}. 12 | --- 13 | {{ .GetComment -}} 14 | {{- end -}} 15 | {{- end }} 16 | 17 | ## Resource Types 18 | 19 | {{ range .packages -}} 20 | {{ $isConfig := (eq .GroupName "") }} 21 | {{- range .VisibleTypes -}} 22 | {{- if or .IsExported (and $isConfig (eq .DisplayName "Configuration")) }} 23 | - [{{ .DisplayName }}]({{ .Link }}) 24 | {{- end -}} 25 | {{- end -}} 26 | {{- end -}} 27 | 28 | {{ range .packages }} 29 | {{ if ne .GroupName "" -}} 30 | {{/* For package with a group name, list all type definitions in it. */}} 31 | {{- range .VisibleTypes }} 32 | {{- if or .Referenced .IsExported -}} 33 | {{ template "type" . }} 34 | {{- end -}} 35 | {{ end }} 36 | {{ else }} 37 | {{/* For package w/o group name, list only types referenced. */}} 38 | {{ $isConfig := (eq .GroupName "") }} 39 | {{- range .VisibleTypes -}} 40 | {{- if or .Referenced $isConfig -}} 41 | {{ template "type" . }} 42 | {{- end -}} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | {{- end }} 47 | -------------------------------------------------------------------------------- /hack/genref/markdown/type.tpl: -------------------------------------------------------------------------------- 1 | {{ define "type" }} 2 | 3 | ## `{{ .Name.Name }}` {#{{ .Anchor }}} 4 | 5 | {{ if eq .Kind "Alias" -}} 6 | (Alias of `{{ .Underlying }}`) 7 | {{ end }} 8 | 9 | {{- with .References }} 10 | **Appears in:** 11 | {{ range . }} 12 | {{ if or .Referenced .IsExported -}} 13 | - [{{ .DisplayName }}]({{ .Link }}) 14 | {{ end -}} 15 | {{- end -}} 16 | {{- end }} 17 | 18 | {{ if .GetComment -}} 19 | {{ .GetComment }} 20 | {{ end }} 21 | {{ if .GetMembers -}} 22 | 23 | 24 | 25 | {{/* . is a apiType */}} 26 | {{- if .IsExported -}} 27 | {{/* Add apiVersion and kind rows if deemed necessary */}} 28 | 29 | 30 | {{ end -}} 31 | 32 | {{/* The actual list of members is in the following template */}} 33 | {{- template "members" . -}} 34 | 35 |
FieldDescription
apiVersion
string
{{- .APIGroup -}}
kind
string
{{- .Name.Name -}}
36 | {{- end -}} 37 | {{- end -}} 38 | -------------------------------------------------------------------------------- /hack/label_nodes/requirements.txt: -------------------------------------------------------------------------------- 1 | kubernetes 2 | pyyaml -------------------------------------------------------------------------------- /hack/python-sdk/swagger_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageName": "jobset", 3 | "projectName": "jobset", 4 | "packageVersion": "0.1.4", 5 | "typeMappings": { 6 | "V1Time": "datetime" 7 | } 8 | } -------------------------------------------------------------------------------- /hack/python-sdk/test-sdk.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2023 The Kubernetes Authors. 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # Unless required by applicable law or agreed to in writing, software 9 | # distributed under the License is distributed on an "AS IS" BASIS, 10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | # See the License for the specific language governing permissions and 12 | # limitations under the License. 13 | 14 | set -o errexit 15 | set -o nounset 16 | set -o pipefail 17 | 18 | repo_root="$(dirname "${BASH_SOURCE}")/../.." 19 | 20 | cd "${repo_root}/sdk/python" 21 | 22 | # Allow one to use podman or docker for local testing. 23 | CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker} 24 | ## For CI we found that docker wasn't started. 25 | ## Should be a no-op if docker is up 26 | 27 | ## If non ubuntu machine, install docker in your path 28 | ${CONTAINER_ENGINE} buildx build -f Dockerfile -t python-unit . 29 | ${CONTAINER_ENGINE} run python-unit pytest test 30 | -------------------------------------------------------------------------------- /hack/update-codegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2023 The Kubernetes Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o nounset 19 | set -o pipefail 20 | 21 | cd "$(dirname "${0}")/.." 22 | GO_CMD=${1:-go} 23 | CODEGEN_PKG=${2:-bin} 24 | REPO_ROOT="$(git rev-parse --show-toplevel)" 25 | 26 | echo "GOPATH=$(go env GOPATH)" 27 | 28 | source "${CODEGEN_PKG}/kube_codegen.sh" 29 | 30 | # TODO: remove the workaround when the issue is solved in the code-generator 31 | # (https://github.com/kubernetes/code-generator/issues/165). 32 | # Here, we create the soft link named "sigs.k8s.io" to the parent directory of 33 | # Jobset to ensure the layout required by the kube_codegen.sh script. 34 | ln -s .. sigs.k8s.io 35 | trap "rm sigs.k8s.io" EXIT 36 | 37 | kube::codegen::gen_helpers \ 38 | --boilerplate "${REPO_ROOT}/hack/boilerplate.go.txt" \ 39 | "${REPO_ROOT}/api" 40 | 41 | kube::codegen::gen_client \ 42 | --with-watch \ 43 | --with-applyconfig \ 44 | --applyconfig-externals "k8s.io/api/batch/v1.JobTemplateSpec:k8s.io/client-go/applyconfigurations/batch/v1" \ 45 | --output-dir "${REPO_ROOT}/client-go" \ 46 | --output-pkg sigs.k8s.io/jobset/client-go \ 47 | --boilerplate "${REPO_ROOT}/hack/boilerplate.go.txt" \ 48 | "${REPO_ROOT}/api" 49 | -------------------------------------------------------------------------------- /hack/update-toc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Kubernetes Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o nounset 19 | set -o pipefail 20 | 21 | # keep in sync with hack/verify-toc.sh 22 | TOOL_VERSION=b8c54a57d69f29386d055584e595f38d65ce2a1f 23 | 24 | # cd to the root path 25 | ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd -P)" 26 | cd "${ROOT}" 27 | 28 | # create a temporary directory 29 | TMP_DIR=$(mktemp -d) 30 | 31 | # cleanup 32 | exitHandler() ( 33 | echo "Cleaning up..." 34 | rm -rf "${TMP_DIR}" 35 | ) 36 | trap exitHandler EXIT 37 | 38 | # Perform go install in a temp dir as we are not tracking this version in a go 39 | # module. 40 | # If we do the go install in the repo, it will create/update go.mod and go.sum. 41 | cd "${TMP_DIR}" 42 | GO111MODULE=on GOBIN="${TMP_DIR}" go install "sigs.k8s.io/mdtoc@${TOOL_VERSION}" 43 | export PATH="${TMP_DIR}:${PATH}" 44 | cd "${ROOT}" 45 | 46 | # Update tables of contents if necessary. 47 | find keps -name '*.md' \ 48 | | grep -Fxvf hack/.notableofcontents \ 49 | | xargs mdtoc --inplace --max-depth=5 || ( 50 | echo "Failed generating TOC. If this failed silently and you are on mac, try 'brew install grep'" 51 | exit 1 52 | ) 53 | -------------------------------------------------------------------------------- /keps/104-StartupPolicy/kep.yaml: -------------------------------------------------------------------------------- 1 | title: Startup Policy 2 | kep-number: 104 3 | authors: 4 | - "@kannon92" 5 | status: provisional 6 | creation-date: 2023-08-01 7 | reviewers: 8 | - "@danielvegamyhre" 9 | - "@vsoch" 10 | approvers: 11 | - "@ahg" 12 | 13 | see-also: 14 | - "NA" 15 | replaces: 16 | - "NA" 17 | 18 | # The target maturity stage in the current dev cycle for this KEP. 19 | stage: alpha 20 | 21 | # The most recent milestone for which work toward delivery of this KEP has been 22 | # done. This can be the current (upcoming) milestone, if it is being actively 23 | # worked on. 24 | latest-milestone: "v0.3.0" 25 | 26 | # The milestone at which this feature was, or is targeted to be, at each stage. 27 | milestone: 28 | alpha: "v0.3.0" 29 | -------------------------------------------------------------------------------- /keps/262-ConfigurableFailurePolicy/kep.yaml: -------------------------------------------------------------------------------- 1 | title: Configurable Failure Policy 2 | kep-number: 262 3 | authors: 4 | - "@danielvegamyhre" 5 | status: provisional 6 | creation-date: 2023-02-05 7 | reviewers: 8 | - "@kannon92" 9 | - "@vsoch" 10 | - "@mimowo" 11 | approvers: 12 | - "@ahg" 13 | 14 | see-also: 15 | - "https://github.com/kubernetes/enhancements/pull/3374" 16 | - "https://github.com/kubernetes/enhancements/pull/4479" 17 | replaces: 18 | - "NA" 19 | -------------------------------------------------------------------------------- /keps/672-serial-job-execution/jobset-serial-execution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/keps/672-serial-job-execution/jobset-serial-execution.png -------------------------------------------------------------------------------- /keps/672-serial-job-execution/kep.yaml: -------------------------------------------------------------------------------- 1 | title: Serial Job Execution with DependsOn API 2 | kep-number: 672 3 | authors: 4 | - "@andreyvelich" 5 | status: provisional 6 | creation-date: 2024-09-25 7 | reviewers: 8 | - "@danielvegamyhre" 9 | - "@kannon92" 10 | approvers: 11 | - "@ahg" 12 | 13 | see-also: 14 | - "NA" 15 | replaces: 16 | - "NA" 17 | 18 | # The target maturity stage in the current dev cycle for this KEP. 19 | stage: alpha 20 | 21 | # The most recent milestone for which work toward delivery of this KEP has been 22 | # done. This can be the current (upcoming) milestone, if it is being actively 23 | # worked on. 24 | latest-milestone: "v0.8.0" 25 | 26 | # The milestone at which this feature was, or is targeted to be, at each stage. 27 | milestone: 28 | alpha: "v0.8.0" 29 | -------------------------------------------------------------------------------- /keps/NNNN-template/kep.yaml: -------------------------------------------------------------------------------- 1 | title: KEP Template 2 | kep-number: NNNN 3 | authors: 4 | - "@jane.doe" 5 | status: provisional|implementable|implemented|deferred|rejected|withdrawn|replaced 6 | creation-date: yyyy-mm-dd 7 | reviewers: 8 | - TBD 9 | - "@alice.doe" 10 | approvers: 11 | - TBD 12 | - "@oscar.doe" 13 | 14 | see-also: 15 | - "/keps/1234-we-heard-you-like-keps" 16 | - "/keps/2345-everyone-gets-a-kep" 17 | replaces: 18 | - "/keps/3456-replaced-kep" 19 | 20 | # The target maturity stage in the current dev cycle for this KEP. 21 | stage: alpha|beta|stable 22 | 23 | # The most recent milestone for which work toward delivery of this KEP has been 24 | # done. This can be the current (upcoming) milestone, if it is being actively 25 | # worked on. 26 | latest-milestone: "v0.2" 27 | 28 | # The milestone at which this feature was, or is targeted to be, at each stage. 29 | milestone: 30 | alpha: "v0.2" 31 | beta: "v0.3" 32 | stable: "v0.5" 33 | 34 | # The following PRR answers are required at alpha release 35 | # List the feature gate name and the components for which it must be enabled 36 | feature-gates: 37 | - name: MyFeature 38 | disable-supported: true 39 | 40 | # The following PRR answers are required at beta release 41 | metrics: 42 | - my_feature_metric 43 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | base = "site" 3 | publish = "public" 4 | command = "npm install && hugo --gc --minify" 5 | 6 | [context.deploy-preview.environment] 7 | HUGO_VERSION = "0.92.0" 8 | NODE_VERSION = "16" 9 | 10 | [context.production.environment] 11 | HUGO_VERSION = "0.92.0" 12 | HUGO_ENV = "production" 13 | NODE_VERSION = "16" 14 | 15 | [context.branch-deploy.environment] 16 | HUGO_VERSION = "0.92.0" 17 | NODE_VERSION = "16" 18 | -------------------------------------------------------------------------------- /pkg/config/validation.go: -------------------------------------------------------------------------------- 1 | package config 2 | 3 | import ( 4 | "strings" 5 | 6 | apimachineryvalidation "k8s.io/apimachinery/pkg/util/validation" 7 | "k8s.io/apimachinery/pkg/util/validation/field" 8 | "k8s.io/utils/ptr" 9 | 10 | configapi "sigs.k8s.io/jobset/api/config/v1alpha1" 11 | ) 12 | 13 | var ( 14 | internalCertManagementPath = field.NewPath("internalCertManagement") 15 | ) 16 | 17 | func validate(c *configapi.Configuration) field.ErrorList { 18 | var allErrs field.ErrorList 19 | allErrs = append(allErrs, validateInternalCertManagement(c)...) 20 | return allErrs 21 | } 22 | 23 | func validateInternalCertManagement(c *configapi.Configuration) field.ErrorList { 24 | var allErrs field.ErrorList 25 | if c.InternalCertManagement == nil || !ptr.Deref(c.InternalCertManagement.Enable, false) { 26 | return allErrs 27 | } 28 | if svcName := c.InternalCertManagement.WebhookServiceName; svcName != nil { 29 | if errs := apimachineryvalidation.IsDNS1035Label(*svcName); len(errs) != 0 { 30 | allErrs = append(allErrs, field.Invalid(internalCertManagementPath.Child("webhookServiceName"), svcName, strings.Join(errs, ","))) 31 | } 32 | } 33 | if secName := c.InternalCertManagement.WebhookSecretName; secName != nil { 34 | if errs := apimachineryvalidation.IsDNS1123Subdomain(*secName); len(errs) != 0 { 35 | allErrs = append(allErrs, field.Invalid(internalCertManagementPath.Child("webhookSecretName"), secName, strings.Join(errs, ","))) 36 | } 37 | } 38 | return allErrs 39 | } 40 | -------------------------------------------------------------------------------- /pkg/controllers/depends_on.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | jobset "sigs.k8s.io/jobset/api/jobset/v1alpha2" 5 | ) 6 | 7 | // dependencyReachedStatus checks if dependant ReplicatedJob reaches Ready or Complete status. 8 | // func dependencyReachedStatus(dependsOnJob jobset.DependsOn, dependsOnJobReplicas int32, rJobsStatuses []jobset.ReplicatedJobStatus) bool { 9 | func dependencyReachedStatus(rJob jobset.ReplicatedJob, rJobReplicas map[string]int32, rJobsStatuses []jobset.ReplicatedJobStatus) bool { 10 | for _, dependsOnJob := range rJob.DependsOn { 11 | // If the actual status of dependant ReplicatedJob is empty, return false. 12 | actualStatus := findReplicatedJobStatus(rJobsStatuses, dependsOnJob.Name) 13 | if actualStatus == nil { 14 | return false 15 | } 16 | 17 | // For Complete status, number of replicas must be equal to number of succeeded Jobs. 18 | if dependsOnJob.Status == jobset.DependencyComplete && rJobReplicas[dependsOnJob.Name] != actualStatus.Succeeded { 19 | return false 20 | } 21 | 22 | // For Ready status, number of replicas must be equal to sum of ready, failed, and succeeded Jobs. 23 | if dependsOnJob.Status == jobset.DependencyReady && rJobReplicas[dependsOnJob.Name] != actualStatus.Failed+actualStatus.Ready+actualStatus.Succeeded { 24 | return false 25 | } 26 | } 27 | 28 | return true 29 | } 30 | -------------------------------------------------------------------------------- /pkg/util/collections/collections.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2023 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | */ 15 | 16 | package collections 17 | 18 | // MergeMaps will merge the `old` and `new` maps and return the 19 | // merged map. If a key appears in both maps, the key-value pair 20 | // in the `new` map will overwrite the value in the `old` map. 21 | func MergeMaps[K comparable, V any](old, new map[K]V) map[K]V { 22 | merged := make(map[K]V) 23 | for k, v := range old { 24 | merged[k] = v 25 | } 26 | for k, v := range new { 27 | merged[k] = v // Overwrite if duplicate 28 | } 29 | return merged 30 | } 31 | 32 | func MergeSlices[T comparable](s1, s2 []T) []T { 33 | mergedSet := make(map[T]bool) 34 | 35 | // Add elements from s1 to the set 36 | for _, item := range s1 { 37 | mergedSet[item] = true 38 | } 39 | 40 | // Add elements from s2, only if they are not already in the set 41 | for _, item := range s2 { 42 | if _, exists := mergedSet[item]; !exists { 43 | mergedSet[item] = true 44 | } 45 | } 46 | 47 | // Convert the set back into a slice 48 | mergedSlice := make([]T, 0, len(mergedSet)) 49 | for item := range mergedSet { 50 | mergedSlice = append(mergedSlice, item) 51 | } 52 | 53 | return mergedSlice 54 | } 55 | -------------------------------------------------------------------------------- /pkg/util/placement/placement.go: -------------------------------------------------------------------------------- 1 | // placement package provides utility functions that are shared between the 2 | // webhooks and controllers to implement the exclusive placement per topology feature. 3 | package placement 4 | 5 | import ( 6 | "fmt" 7 | 8 | batchv1 "k8s.io/api/batch/v1" 9 | corev1 "k8s.io/api/core/v1" 10 | ) 11 | 12 | // GenJobName deterministically generates the child job name from the given 13 | // JobSet name, replicated job name, and job index. 14 | func GenJobName(jsName, rjobName string, jobIndex int) string { 15 | return fmt.Sprintf("%s-%s-%d", jsName, rjobName, jobIndex) 16 | } 17 | 18 | // GenPodName returns the pod name for the given JobSet name, ReplicatedJob name, 19 | // Job index, and Pod index. 20 | func GenPodName(jobSet, replicatedJob, jobIndex, podIndex string) string { 21 | return fmt.Sprintf("%s-%s-%s-%s", jobSet, replicatedJob, jobIndex, podIndex) 22 | } 23 | 24 | // IsLeaderPod returns true if the given pod is a leader pod (job completion index of 0), 25 | // otherwise it returns false. 26 | func IsLeaderPod(pod *corev1.Pod) bool { 27 | return pod.Annotations[batchv1.JobCompletionIndexAnnotation] == "0" 28 | } 29 | -------------------------------------------------------------------------------- /pkg/util/useragent/useragent.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 The Kubernetes Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package useragent 18 | 19 | import ( 20 | "fmt" 21 | "runtime" 22 | "strings" 23 | 24 | "sigs.k8s.io/jobset/pkg/constants" 25 | "sigs.k8s.io/jobset/pkg/version" 26 | ) 27 | 28 | // adjustVersion strips "alpha", "beta", etc. from version in form 29 | // major.minor.patch-[alpha|beta|etc]. 30 | func adjustVersion(v string) string { 31 | if len(v) == 0 { 32 | return "unknown" 33 | } 34 | seg := strings.SplitN(v, "-", 2) 35 | return seg[0] 36 | } 37 | 38 | // adjustCommit returns sufficient significant figures of the commit's git hash. 39 | func adjustCommit(c string) string { 40 | if len(c) == 0 { 41 | return "unknown" 42 | } 43 | if len(c) > 7 { 44 | return c[:7] 45 | } 46 | return c 47 | } 48 | 49 | // Default returns User-Agent string built from static global vars. 50 | func Default() string { 51 | return fmt.Sprintf("%s/%s (%s/%s) %s", 52 | constants.JobSetSubsystemName, 53 | adjustVersion(version.GitVersion), 54 | runtime.GOOS, 55 | runtime.GOARCH, 56 | adjustCommit(version.GitCommit)) 57 | } 58 | -------------------------------------------------------------------------------- /pkg/util/useragent/useragent_test.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | package useragent 15 | 16 | import ( 17 | "fmt" 18 | "runtime" 19 | "testing" 20 | ) 21 | 22 | func TestDefault(t *testing.T) { 23 | want := fmt.Sprintf("jobset/v0.0.0 (%s/%s) abcd012", runtime.GOOS, runtime.GOARCH) 24 | ua := Default() 25 | if ua != want { 26 | t.Errorf("Default()=%q, want %q", ua, want) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /pkg/version/version.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025 The Kubernetes Authors. 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | Unless required by applicable law or agreed to in writing, software 8 | distributed under the License is distributed on an "AS IS" BASIS, 9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | See the License for the specific language governing permissions and 11 | limitations under the License. 12 | */ 13 | 14 | package version 15 | 16 | // Base version information. 17 | // 18 | // This is the fallback data used when version information from git is not 19 | // provided via go ldflags. 20 | // 21 | // If you are looking at these fields in the git tree, they look 22 | // strange. They are modified on the fly by the build process. 23 | var ( 24 | GitVersion string = "v0.0.0-main" 25 | GitCommit string = "abcd01234" // sha1 from git, output of $(git rev-parse HEAD) 26 | ) 27 | -------------------------------------------------------------------------------- /sdk/python/.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | venv/ 48 | .venv/ 49 | .python-version 50 | .pytest_cache 51 | 52 | # Translations 53 | *.mo 54 | *.pot 55 | 56 | # Django stuff: 57 | *.log 58 | 59 | # Sphinx documentation 60 | docs/_build/ 61 | 62 | # PyBuilder 63 | target/ 64 | 65 | #Ipython Notebook 66 | .ipynb_checkpoints 67 | -------------------------------------------------------------------------------- /sdk/python/.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | # NOTE: This file is auto generated by OpenAPI Generator. 2 | # URL: https://openapi-generator.tech 3 | # 4 | # ref: https://docs.gitlab.com/ee/ci/README.html 5 | # ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml 6 | 7 | stages: 8 | - test 9 | 10 | .pytest: 11 | stage: test 12 | script: 13 | - pip install -r requirements.txt 14 | - pip install -r test-requirements.txt 15 | - pytest --cov=jobset 16 | 17 | pytest-3.8: 18 | extends: .pytest 19 | image: python:3.8-alpine 20 | pytest-3.9: 21 | extends: .pytest 22 | image: python:3.9-alpine 23 | pytest-3.10: 24 | extends: .pytest 25 | image: python:3.10-alpine 26 | pytest-3.11: 27 | extends: .pytest 28 | image: python:3.11-alpine 29 | pytest-3.12: 30 | extends: .pytest 31 | image: python:3.12-alpine 32 | -------------------------------------------------------------------------------- /sdk/python/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /sdk/python/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 7.11.0 2 | -------------------------------------------------------------------------------- /sdk/python/.travis.yml: -------------------------------------------------------------------------------- 1 | # ref: https://docs.travis-ci.com/user/languages/python 2 | language: python 3 | python: 4 | - "3.8" 5 | - "3.9" 6 | - "3.10" 7 | - "3.11" 8 | - "3.12" 9 | # uncomment the following if needed 10 | #- "3.12-dev" # 3.12 development branch 11 | #- "nightly" # nightly build 12 | # command to install dependencies 13 | install: 14 | - "pip install -r requirements.txt" 15 | - "pip install -r test-requirements.txt" 16 | # command to run tests 17 | script: pytest --cov=jobset 18 | -------------------------------------------------------------------------------- /sdk/python/Dockerfile: -------------------------------------------------------------------------------- 1 | # Use the official Python image as the base image 2 | FROM python:3.13 3 | 4 | # Set the working directory inside the container 5 | WORKDIR /app 6 | 7 | # Copy the requirements.txt file to the container 8 | COPY requirements.txt . 9 | COPY test-requirements.txt . 10 | 11 | # Install the Python packages specified in requirements.txt 12 | RUN pip install --no-cache-dir -r test-requirements.txt -r requirements.txt 13 | 14 | # Copy the rest of the application code to the container 15 | COPY . . 16 | -------------------------------------------------------------------------------- /sdk/python/examples/README.md: -------------------------------------------------------------------------------- 1 | # Using the Python SDK 2 | 3 | # Installation 4 | 5 | Easiest way to get started is to create a virtual environment. 6 | 7 | ```bash 8 | python3 -m venv jobset-test 9 | source jobset-test/bin/active 10 | python3 -m pip install sdk/python/. 11 | ``` 12 | 13 | This will install the jobset package into your virtual environment. 14 | 15 | See create_jobset.py for some examples of using the models. -------------------------------------------------------------------------------- /sdk/python/jobset/api/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | # import apis into api package 4 | 5 | -------------------------------------------------------------------------------- /sdk/python/jobset/api_response.py: -------------------------------------------------------------------------------- 1 | """API response object.""" 2 | 3 | from __future__ import annotations 4 | from typing import Optional, Generic, Mapping, TypeVar 5 | from pydantic import Field, StrictInt, StrictBytes, BaseModel 6 | 7 | T = TypeVar("T") 8 | 9 | class ApiResponse(BaseModel, Generic[T]): 10 | """ 11 | API response object 12 | """ 13 | 14 | status_code: StrictInt = Field(description="HTTP status code") 15 | headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") 16 | data: T = Field(description="Deserialized data given the data type") 17 | raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") 18 | 19 | model_config = { 20 | "arbitrary_types_allowed": True 21 | } 22 | -------------------------------------------------------------------------------- /sdk/python/jobset/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/sdk/python/jobset/py.typed -------------------------------------------------------------------------------- /sdk/python/requirements.txt: -------------------------------------------------------------------------------- 1 | urllib3 >= 1.25.3, < 3.0.0 2 | python_dateutil >= 2.8.2 3 | pydantic >= 2 4 | typing-extensions >= 4.7.1 5 | -------------------------------------------------------------------------------- /sdk/python/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length=99 3 | -------------------------------------------------------------------------------- /sdk/python/test-requirements.txt: -------------------------------------------------------------------------------- 1 | kubernetes 2 | pytest >= 7.2.1 3 | pytest-cov >= 2.8.1 4 | tox >= 3.9.0 5 | flake8 >= 4.0.0 6 | types-python-dateutil >= 2.8.19.14 7 | mypy >= 1.5 8 | -------------------------------------------------------------------------------- /sdk/python/test/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/sdk/python/test/__init__.py -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_batch_v1_success_policy_rule.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_batch_v1_success_policy_rule import IoK8sApiBatchV1SuccessPolicyRule 18 | 19 | class TestIoK8sApiBatchV1SuccessPolicyRule(unittest.TestCase): 20 | """IoK8sApiBatchV1SuccessPolicyRule unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiBatchV1SuccessPolicyRule: 29 | """Test IoK8sApiBatchV1SuccessPolicyRule 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiBatchV1SuccessPolicyRule` 34 | """ 35 | model = IoK8sApiBatchV1SuccessPolicyRule() 36 | if include_optional: 37 | return IoK8sApiBatchV1SuccessPolicyRule( 38 | succeeded_count = 56, 39 | succeeded_indexes = '' 40 | ) 41 | else: 42 | return IoK8sApiBatchV1SuccessPolicyRule( 43 | ) 44 | """ 45 | 46 | def testIoK8sApiBatchV1SuccessPolicyRule(self): 47 | """Test IoK8sApiBatchV1SuccessPolicyRule""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_app_armor_profile.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_app_armor_profile import IoK8sApiCoreV1AppArmorProfile 18 | 19 | class TestIoK8sApiCoreV1AppArmorProfile(unittest.TestCase): 20 | """IoK8sApiCoreV1AppArmorProfile unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1AppArmorProfile: 29 | """Test IoK8sApiCoreV1AppArmorProfile 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1AppArmorProfile` 34 | """ 35 | model = IoK8sApiCoreV1AppArmorProfile() 36 | if include_optional: 37 | return IoK8sApiCoreV1AppArmorProfile( 38 | localhost_profile = '', 39 | type = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1AppArmorProfile( 43 | type = '', 44 | ) 45 | """ 46 | 47 | def testIoK8sApiCoreV1AppArmorProfile(self): 48 | """Test IoK8sApiCoreV1AppArmorProfile""" 49 | # inst_req_only = self.make_instance(include_optional=False) 50 | # inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_capabilities.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_capabilities import IoK8sApiCoreV1Capabilities 18 | 19 | class TestIoK8sApiCoreV1Capabilities(unittest.TestCase): 20 | """IoK8sApiCoreV1Capabilities unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1Capabilities: 29 | """Test IoK8sApiCoreV1Capabilities 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1Capabilities` 34 | """ 35 | model = IoK8sApiCoreV1Capabilities() 36 | if include_optional: 37 | return IoK8sApiCoreV1Capabilities( 38 | add = [ 39 | '' 40 | ], 41 | drop = [ 42 | '' 43 | ] 44 | ) 45 | else: 46 | return IoK8sApiCoreV1Capabilities( 47 | ) 48 | """ 49 | 50 | def testIoK8sApiCoreV1Capabilities(self): 51 | """Test IoK8sApiCoreV1Capabilities""" 52 | # inst_req_only = self.make_instance(include_optional=False) 53 | # inst_req_and_optional = self.make_instance(include_optional=True) 54 | 55 | if __name__ == '__main__': 56 | unittest.main() 57 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_config_map_env_source.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_config_map_env_source import IoK8sApiCoreV1ConfigMapEnvSource 18 | 19 | class TestIoK8sApiCoreV1ConfigMapEnvSource(unittest.TestCase): 20 | """IoK8sApiCoreV1ConfigMapEnvSource unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1ConfigMapEnvSource: 29 | """Test IoK8sApiCoreV1ConfigMapEnvSource 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1ConfigMapEnvSource` 34 | """ 35 | model = IoK8sApiCoreV1ConfigMapEnvSource() 36 | if include_optional: 37 | return IoK8sApiCoreV1ConfigMapEnvSource( 38 | name = '', 39 | optional = True 40 | ) 41 | else: 42 | return IoK8sApiCoreV1ConfigMapEnvSource( 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1ConfigMapEnvSource(self): 47 | """Test IoK8sApiCoreV1ConfigMapEnvSource""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_empty_dir_volume_source.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_empty_dir_volume_source import IoK8sApiCoreV1EmptyDirVolumeSource 18 | 19 | class TestIoK8sApiCoreV1EmptyDirVolumeSource(unittest.TestCase): 20 | """IoK8sApiCoreV1EmptyDirVolumeSource unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1EmptyDirVolumeSource: 29 | """Test IoK8sApiCoreV1EmptyDirVolumeSource 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1EmptyDirVolumeSource` 34 | """ 35 | model = IoK8sApiCoreV1EmptyDirVolumeSource() 36 | if include_optional: 37 | return IoK8sApiCoreV1EmptyDirVolumeSource( 38 | medium = '', 39 | size_limit = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1EmptyDirVolumeSource( 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1EmptyDirVolumeSource(self): 47 | """Test IoK8sApiCoreV1EmptyDirVolumeSource""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_exec_action.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_exec_action import IoK8sApiCoreV1ExecAction 18 | 19 | class TestIoK8sApiCoreV1ExecAction(unittest.TestCase): 20 | """IoK8sApiCoreV1ExecAction unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1ExecAction: 29 | """Test IoK8sApiCoreV1ExecAction 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1ExecAction` 34 | """ 35 | model = IoK8sApiCoreV1ExecAction() 36 | if include_optional: 37 | return IoK8sApiCoreV1ExecAction( 38 | command = [ 39 | '' 40 | ] 41 | ) 42 | else: 43 | return IoK8sApiCoreV1ExecAction( 44 | ) 45 | """ 46 | 47 | def testIoK8sApiCoreV1ExecAction(self): 48 | """Test IoK8sApiCoreV1ExecAction""" 49 | # inst_req_only = self.make_instance(include_optional=False) 50 | # inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_flocker_volume_source.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_flocker_volume_source import IoK8sApiCoreV1FlockerVolumeSource 18 | 19 | class TestIoK8sApiCoreV1FlockerVolumeSource(unittest.TestCase): 20 | """IoK8sApiCoreV1FlockerVolumeSource unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1FlockerVolumeSource: 29 | """Test IoK8sApiCoreV1FlockerVolumeSource 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1FlockerVolumeSource` 34 | """ 35 | model = IoK8sApiCoreV1FlockerVolumeSource() 36 | if include_optional: 37 | return IoK8sApiCoreV1FlockerVolumeSource( 38 | dataset_name = '', 39 | dataset_uuid = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1FlockerVolumeSource( 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1FlockerVolumeSource(self): 47 | """Test IoK8sApiCoreV1FlockerVolumeSource""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_grpc_action.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_grpc_action import IoK8sApiCoreV1GRPCAction 18 | 19 | class TestIoK8sApiCoreV1GRPCAction(unittest.TestCase): 20 | """IoK8sApiCoreV1GRPCAction unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1GRPCAction: 29 | """Test IoK8sApiCoreV1GRPCAction 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1GRPCAction` 34 | """ 35 | model = IoK8sApiCoreV1GRPCAction() 36 | if include_optional: 37 | return IoK8sApiCoreV1GRPCAction( 38 | port = 56, 39 | service = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1GRPCAction( 43 | port = 56, 44 | ) 45 | """ 46 | 47 | def testIoK8sApiCoreV1GRPCAction(self): 48 | """Test IoK8sApiCoreV1GRPCAction""" 49 | # inst_req_only = self.make_instance(include_optional=False) 50 | # inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_host_alias.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_host_alias import IoK8sApiCoreV1HostAlias 18 | 19 | class TestIoK8sApiCoreV1HostAlias(unittest.TestCase): 20 | """IoK8sApiCoreV1HostAlias unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1HostAlias: 29 | """Test IoK8sApiCoreV1HostAlias 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1HostAlias` 34 | """ 35 | model = IoK8sApiCoreV1HostAlias() 36 | if include_optional: 37 | return IoK8sApiCoreV1HostAlias( 38 | hostnames = [ 39 | '' 40 | ], 41 | ip = '' 42 | ) 43 | else: 44 | return IoK8sApiCoreV1HostAlias( 45 | ip = '', 46 | ) 47 | """ 48 | 49 | def testIoK8sApiCoreV1HostAlias(self): 50 | """Test IoK8sApiCoreV1HostAlias""" 51 | # inst_req_only = self.make_instance(include_optional=False) 52 | # inst_req_and_optional = self.make_instance(include_optional=True) 53 | 54 | if __name__ == '__main__': 55 | unittest.main() 56 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_http_header.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_http_header import IoK8sApiCoreV1HTTPHeader 18 | 19 | class TestIoK8sApiCoreV1HTTPHeader(unittest.TestCase): 20 | """IoK8sApiCoreV1HTTPHeader unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1HTTPHeader: 29 | """Test IoK8sApiCoreV1HTTPHeader 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1HTTPHeader` 34 | """ 35 | model = IoK8sApiCoreV1HTTPHeader() 36 | if include_optional: 37 | return IoK8sApiCoreV1HTTPHeader( 38 | name = '', 39 | value = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1HTTPHeader( 43 | name = '', 44 | value = '', 45 | ) 46 | """ 47 | 48 | def testIoK8sApiCoreV1HTTPHeader(self): 49 | """Test IoK8sApiCoreV1HTTPHeader""" 50 | # inst_req_only = self.make_instance(include_optional=False) 51 | # inst_req_and_optional = self.make_instance(include_optional=True) 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_image_volume_source.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_image_volume_source import IoK8sApiCoreV1ImageVolumeSource 18 | 19 | class TestIoK8sApiCoreV1ImageVolumeSource(unittest.TestCase): 20 | """IoK8sApiCoreV1ImageVolumeSource unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1ImageVolumeSource: 29 | """Test IoK8sApiCoreV1ImageVolumeSource 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1ImageVolumeSource` 34 | """ 35 | model = IoK8sApiCoreV1ImageVolumeSource() 36 | if include_optional: 37 | return IoK8sApiCoreV1ImageVolumeSource( 38 | pull_policy = '', 39 | reference = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1ImageVolumeSource( 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1ImageVolumeSource(self): 47 | """Test IoK8sApiCoreV1ImageVolumeSource""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_key_to_path.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_key_to_path import IoK8sApiCoreV1KeyToPath 18 | 19 | class TestIoK8sApiCoreV1KeyToPath(unittest.TestCase): 20 | """IoK8sApiCoreV1KeyToPath unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1KeyToPath: 29 | """Test IoK8sApiCoreV1KeyToPath 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1KeyToPath` 34 | """ 35 | model = IoK8sApiCoreV1KeyToPath() 36 | if include_optional: 37 | return IoK8sApiCoreV1KeyToPath( 38 | key = '', 39 | mode = 56, 40 | path = '' 41 | ) 42 | else: 43 | return IoK8sApiCoreV1KeyToPath( 44 | key = '', 45 | path = '', 46 | ) 47 | """ 48 | 49 | def testIoK8sApiCoreV1KeyToPath(self): 50 | """Test IoK8sApiCoreV1KeyToPath""" 51 | # inst_req_only = self.make_instance(include_optional=False) 52 | # inst_req_and_optional = self.make_instance(include_optional=True) 53 | 54 | if __name__ == '__main__': 55 | unittest.main() 56 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_local_object_reference.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_local_object_reference import IoK8sApiCoreV1LocalObjectReference 18 | 19 | class TestIoK8sApiCoreV1LocalObjectReference(unittest.TestCase): 20 | """IoK8sApiCoreV1LocalObjectReference unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1LocalObjectReference: 29 | """Test IoK8sApiCoreV1LocalObjectReference 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1LocalObjectReference` 34 | """ 35 | model = IoK8sApiCoreV1LocalObjectReference() 36 | if include_optional: 37 | return IoK8sApiCoreV1LocalObjectReference( 38 | name = '' 39 | ) 40 | else: 41 | return IoK8sApiCoreV1LocalObjectReference( 42 | ) 43 | """ 44 | 45 | def testIoK8sApiCoreV1LocalObjectReference(self): 46 | """Test IoK8sApiCoreV1LocalObjectReference""" 47 | # inst_req_only = self.make_instance(include_optional=False) 48 | # inst_req_and_optional = self.make_instance(include_optional=True) 49 | 50 | if __name__ == '__main__': 51 | unittest.main() 52 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_pod_dns_config_option.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_pod_dns_config_option import IoK8sApiCoreV1PodDNSConfigOption 18 | 19 | class TestIoK8sApiCoreV1PodDNSConfigOption(unittest.TestCase): 20 | """IoK8sApiCoreV1PodDNSConfigOption unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1PodDNSConfigOption: 29 | """Test IoK8sApiCoreV1PodDNSConfigOption 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1PodDNSConfigOption` 34 | """ 35 | model = IoK8sApiCoreV1PodDNSConfigOption() 36 | if include_optional: 37 | return IoK8sApiCoreV1PodDNSConfigOption( 38 | name = '', 39 | value = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1PodDNSConfigOption( 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1PodDNSConfigOption(self): 47 | """Test IoK8sApiCoreV1PodDNSConfigOption""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_pod_os.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_pod_os import IoK8sApiCoreV1PodOS 18 | 19 | class TestIoK8sApiCoreV1PodOS(unittest.TestCase): 20 | """IoK8sApiCoreV1PodOS unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1PodOS: 29 | """Test IoK8sApiCoreV1PodOS 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1PodOS` 34 | """ 35 | model = IoK8sApiCoreV1PodOS() 36 | if include_optional: 37 | return IoK8sApiCoreV1PodOS( 38 | name = '' 39 | ) 40 | else: 41 | return IoK8sApiCoreV1PodOS( 42 | name = '', 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1PodOS(self): 47 | """Test IoK8sApiCoreV1PodOS""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_pod_readiness_gate.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_pod_readiness_gate import IoK8sApiCoreV1PodReadinessGate 18 | 19 | class TestIoK8sApiCoreV1PodReadinessGate(unittest.TestCase): 20 | """IoK8sApiCoreV1PodReadinessGate unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1PodReadinessGate: 29 | """Test IoK8sApiCoreV1PodReadinessGate 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1PodReadinessGate` 34 | """ 35 | model = IoK8sApiCoreV1PodReadinessGate() 36 | if include_optional: 37 | return IoK8sApiCoreV1PodReadinessGate( 38 | condition_type = '' 39 | ) 40 | else: 41 | return IoK8sApiCoreV1PodReadinessGate( 42 | condition_type = '', 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1PodReadinessGate(self): 47 | """Test IoK8sApiCoreV1PodReadinessGate""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_pod_scheduling_gate.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_pod_scheduling_gate import IoK8sApiCoreV1PodSchedulingGate 18 | 19 | class TestIoK8sApiCoreV1PodSchedulingGate(unittest.TestCase): 20 | """IoK8sApiCoreV1PodSchedulingGate unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1PodSchedulingGate: 29 | """Test IoK8sApiCoreV1PodSchedulingGate 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1PodSchedulingGate` 34 | """ 35 | model = IoK8sApiCoreV1PodSchedulingGate() 36 | if include_optional: 37 | return IoK8sApiCoreV1PodSchedulingGate( 38 | name = '' 39 | ) 40 | else: 41 | return IoK8sApiCoreV1PodSchedulingGate( 42 | name = '', 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1PodSchedulingGate(self): 47 | """Test IoK8sApiCoreV1PodSchedulingGate""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_resource_claim.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_resource_claim import IoK8sApiCoreV1ResourceClaim 18 | 19 | class TestIoK8sApiCoreV1ResourceClaim(unittest.TestCase): 20 | """IoK8sApiCoreV1ResourceClaim unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1ResourceClaim: 29 | """Test IoK8sApiCoreV1ResourceClaim 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1ResourceClaim` 34 | """ 35 | model = IoK8sApiCoreV1ResourceClaim() 36 | if include_optional: 37 | return IoK8sApiCoreV1ResourceClaim( 38 | name = '', 39 | request = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1ResourceClaim( 43 | name = '', 44 | ) 45 | """ 46 | 47 | def testIoK8sApiCoreV1ResourceClaim(self): 48 | """Test IoK8sApiCoreV1ResourceClaim""" 49 | # inst_req_only = self.make_instance(include_optional=False) 50 | # inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_se_linux_options.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_se_linux_options import IoK8sApiCoreV1SELinuxOptions 18 | 19 | class TestIoK8sApiCoreV1SELinuxOptions(unittest.TestCase): 20 | """IoK8sApiCoreV1SELinuxOptions unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1SELinuxOptions: 29 | """Test IoK8sApiCoreV1SELinuxOptions 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1SELinuxOptions` 34 | """ 35 | model = IoK8sApiCoreV1SELinuxOptions() 36 | if include_optional: 37 | return IoK8sApiCoreV1SELinuxOptions( 38 | level = '', 39 | role = '', 40 | type = '', 41 | user = '' 42 | ) 43 | else: 44 | return IoK8sApiCoreV1SELinuxOptions( 45 | ) 46 | """ 47 | 48 | def testIoK8sApiCoreV1SELinuxOptions(self): 49 | """Test IoK8sApiCoreV1SELinuxOptions""" 50 | # inst_req_only = self.make_instance(include_optional=False) 51 | # inst_req_and_optional = self.make_instance(include_optional=True) 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_seccomp_profile.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_seccomp_profile import IoK8sApiCoreV1SeccompProfile 18 | 19 | class TestIoK8sApiCoreV1SeccompProfile(unittest.TestCase): 20 | """IoK8sApiCoreV1SeccompProfile unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1SeccompProfile: 29 | """Test IoK8sApiCoreV1SeccompProfile 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1SeccompProfile` 34 | """ 35 | model = IoK8sApiCoreV1SeccompProfile() 36 | if include_optional: 37 | return IoK8sApiCoreV1SeccompProfile( 38 | localhost_profile = '', 39 | type = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1SeccompProfile( 43 | type = '', 44 | ) 45 | """ 46 | 47 | def testIoK8sApiCoreV1SeccompProfile(self): 48 | """Test IoK8sApiCoreV1SeccompProfile""" 49 | # inst_req_only = self.make_instance(include_optional=False) 50 | # inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_secret_env_source.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_secret_env_source import IoK8sApiCoreV1SecretEnvSource 18 | 19 | class TestIoK8sApiCoreV1SecretEnvSource(unittest.TestCase): 20 | """IoK8sApiCoreV1SecretEnvSource unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1SecretEnvSource: 29 | """Test IoK8sApiCoreV1SecretEnvSource 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1SecretEnvSource` 34 | """ 35 | model = IoK8sApiCoreV1SecretEnvSource() 36 | if include_optional: 37 | return IoK8sApiCoreV1SecretEnvSource( 38 | name = '', 39 | optional = True 40 | ) 41 | else: 42 | return IoK8sApiCoreV1SecretEnvSource( 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1SecretEnvSource(self): 47 | """Test IoK8sApiCoreV1SecretEnvSource""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_secret_key_selector.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_secret_key_selector import IoK8sApiCoreV1SecretKeySelector 18 | 19 | class TestIoK8sApiCoreV1SecretKeySelector(unittest.TestCase): 20 | """IoK8sApiCoreV1SecretKeySelector unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1SecretKeySelector: 29 | """Test IoK8sApiCoreV1SecretKeySelector 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1SecretKeySelector` 34 | """ 35 | model = IoK8sApiCoreV1SecretKeySelector() 36 | if include_optional: 37 | return IoK8sApiCoreV1SecretKeySelector( 38 | key = '', 39 | name = '', 40 | optional = True 41 | ) 42 | else: 43 | return IoK8sApiCoreV1SecretKeySelector( 44 | key = '', 45 | ) 46 | """ 47 | 48 | def testIoK8sApiCoreV1SecretKeySelector(self): 49 | """Test IoK8sApiCoreV1SecretKeySelector""" 50 | # inst_req_only = self.make_instance(include_optional=False) 51 | # inst_req_and_optional = self.make_instance(include_optional=True) 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_sleep_action.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_sleep_action import IoK8sApiCoreV1SleepAction 18 | 19 | class TestIoK8sApiCoreV1SleepAction(unittest.TestCase): 20 | """IoK8sApiCoreV1SleepAction unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1SleepAction: 29 | """Test IoK8sApiCoreV1SleepAction 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1SleepAction` 34 | """ 35 | model = IoK8sApiCoreV1SleepAction() 36 | if include_optional: 37 | return IoK8sApiCoreV1SleepAction( 38 | seconds = 56 39 | ) 40 | else: 41 | return IoK8sApiCoreV1SleepAction( 42 | seconds = 56, 43 | ) 44 | """ 45 | 46 | def testIoK8sApiCoreV1SleepAction(self): 47 | """Test IoK8sApiCoreV1SleepAction""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_sysctl.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_sysctl import IoK8sApiCoreV1Sysctl 18 | 19 | class TestIoK8sApiCoreV1Sysctl(unittest.TestCase): 20 | """IoK8sApiCoreV1Sysctl unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1Sysctl: 29 | """Test IoK8sApiCoreV1Sysctl 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1Sysctl` 34 | """ 35 | model = IoK8sApiCoreV1Sysctl() 36 | if include_optional: 37 | return IoK8sApiCoreV1Sysctl( 38 | name = '', 39 | value = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1Sysctl( 43 | name = '', 44 | value = '', 45 | ) 46 | """ 47 | 48 | def testIoK8sApiCoreV1Sysctl(self): 49 | """Test IoK8sApiCoreV1Sysctl""" 50 | # inst_req_only = self.make_instance(include_optional=False) 51 | # inst_req_and_optional = self.make_instance(include_optional=True) 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_tcp_socket_action.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_tcp_socket_action import IoK8sApiCoreV1TCPSocketAction 18 | 19 | class TestIoK8sApiCoreV1TCPSocketAction(unittest.TestCase): 20 | """IoK8sApiCoreV1TCPSocketAction unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1TCPSocketAction: 29 | """Test IoK8sApiCoreV1TCPSocketAction 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1TCPSocketAction` 34 | """ 35 | model = IoK8sApiCoreV1TCPSocketAction() 36 | if include_optional: 37 | return IoK8sApiCoreV1TCPSocketAction( 38 | host = '', 39 | port = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1TCPSocketAction( 43 | port = '', 44 | ) 45 | """ 46 | 47 | def testIoK8sApiCoreV1TCPSocketAction(self): 48 | """Test IoK8sApiCoreV1TCPSocketAction""" 49 | # inst_req_only = self.make_instance(include_optional=False) 50 | # inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_toleration.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_toleration import IoK8sApiCoreV1Toleration 18 | 19 | class TestIoK8sApiCoreV1Toleration(unittest.TestCase): 20 | """IoK8sApiCoreV1Toleration unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1Toleration: 29 | """Test IoK8sApiCoreV1Toleration 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1Toleration` 34 | """ 35 | model = IoK8sApiCoreV1Toleration() 36 | if include_optional: 37 | return IoK8sApiCoreV1Toleration( 38 | effect = '', 39 | key = '', 40 | operator = '', 41 | toleration_seconds = 56, 42 | value = '' 43 | ) 44 | else: 45 | return IoK8sApiCoreV1Toleration( 46 | ) 47 | """ 48 | 49 | def testIoK8sApiCoreV1Toleration(self): 50 | """Test IoK8sApiCoreV1Toleration""" 51 | # inst_req_only = self.make_instance(include_optional=False) 52 | # inst_req_and_optional = self.make_instance(include_optional=True) 53 | 54 | if __name__ == '__main__': 55 | unittest.main() 56 | -------------------------------------------------------------------------------- /sdk/python/test/test_io_k8s_api_core_v1_volume_device.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.io_k8s_api_core_v1_volume_device import IoK8sApiCoreV1VolumeDevice 18 | 19 | class TestIoK8sApiCoreV1VolumeDevice(unittest.TestCase): 20 | """IoK8sApiCoreV1VolumeDevice unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> IoK8sApiCoreV1VolumeDevice: 29 | """Test IoK8sApiCoreV1VolumeDevice 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `IoK8sApiCoreV1VolumeDevice` 34 | """ 35 | model = IoK8sApiCoreV1VolumeDevice() 36 | if include_optional: 37 | return IoK8sApiCoreV1VolumeDevice( 38 | device_path = '', 39 | name = '' 40 | ) 41 | else: 42 | return IoK8sApiCoreV1VolumeDevice( 43 | device_path = '', 44 | name = '', 45 | ) 46 | """ 47 | 48 | def testIoK8sApiCoreV1VolumeDevice(self): 49 | """Test IoK8sApiCoreV1VolumeDevice""" 50 | # inst_req_only = self.make_instance(include_optional=False) 51 | # inst_req_and_optional = self.make_instance(include_optional=True) 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /sdk/python/test/test_jobset_v1alpha2_coordinator.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.jobset_v1alpha2_coordinator import JobsetV1alpha2Coordinator 18 | 19 | class TestJobsetV1alpha2Coordinator(unittest.TestCase): 20 | """JobsetV1alpha2Coordinator unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> JobsetV1alpha2Coordinator: 29 | """Test JobsetV1alpha2Coordinator 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `JobsetV1alpha2Coordinator` 34 | """ 35 | model = JobsetV1alpha2Coordinator() 36 | if include_optional: 37 | return JobsetV1alpha2Coordinator( 38 | job_index = 56, 39 | pod_index = 56, 40 | replicated_job = '' 41 | ) 42 | else: 43 | return JobsetV1alpha2Coordinator( 44 | replicated_job = '', 45 | ) 46 | """ 47 | 48 | def testJobsetV1alpha2Coordinator(self): 49 | """Test JobsetV1alpha2Coordinator""" 50 | # inst_req_only = self.make_instance(include_optional=False) 51 | # inst_req_and_optional = self.make_instance(include_optional=True) 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /sdk/python/test/test_jobset_v1alpha2_depends_on.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.jobset_v1alpha2_depends_on import JobsetV1alpha2DependsOn 18 | 19 | class TestJobsetV1alpha2DependsOn(unittest.TestCase): 20 | """JobsetV1alpha2DependsOn unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> JobsetV1alpha2DependsOn: 29 | """Test JobsetV1alpha2DependsOn 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `JobsetV1alpha2DependsOn` 34 | """ 35 | model = JobsetV1alpha2DependsOn() 36 | if include_optional: 37 | return JobsetV1alpha2DependsOn( 38 | name = '', 39 | status = '' 40 | ) 41 | else: 42 | return JobsetV1alpha2DependsOn( 43 | name = '', 44 | status = '', 45 | ) 46 | """ 47 | 48 | def testJobsetV1alpha2DependsOn(self): 49 | """Test JobsetV1alpha2DependsOn""" 50 | # inst_req_only = self.make_instance(include_optional=False) 51 | # inst_req_and_optional = self.make_instance(include_optional=True) 52 | 53 | if __name__ == '__main__': 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /sdk/python/test/test_jobset_v1alpha2_network.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.jobset_v1alpha2_network import JobsetV1alpha2Network 18 | 19 | class TestJobsetV1alpha2Network(unittest.TestCase): 20 | """JobsetV1alpha2Network unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> JobsetV1alpha2Network: 29 | """Test JobsetV1alpha2Network 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `JobsetV1alpha2Network` 34 | """ 35 | model = JobsetV1alpha2Network() 36 | if include_optional: 37 | return JobsetV1alpha2Network( 38 | enable_dns_hostnames = True, 39 | publish_not_ready_addresses = True, 40 | subdomain = '' 41 | ) 42 | else: 43 | return JobsetV1alpha2Network( 44 | ) 45 | """ 46 | 47 | def testJobsetV1alpha2Network(self): 48 | """Test JobsetV1alpha2Network""" 49 | # inst_req_only = self.make_instance(include_optional=False) 50 | # inst_req_and_optional = self.make_instance(include_optional=True) 51 | 52 | if __name__ == '__main__': 53 | unittest.main() 54 | -------------------------------------------------------------------------------- /sdk/python/test/test_jobset_v1alpha2_startup_policy.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.jobset_v1alpha2_startup_policy import JobsetV1alpha2StartupPolicy 18 | 19 | class TestJobsetV1alpha2StartupPolicy(unittest.TestCase): 20 | """JobsetV1alpha2StartupPolicy unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> JobsetV1alpha2StartupPolicy: 29 | """Test JobsetV1alpha2StartupPolicy 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `JobsetV1alpha2StartupPolicy` 34 | """ 35 | model = JobsetV1alpha2StartupPolicy() 36 | if include_optional: 37 | return JobsetV1alpha2StartupPolicy( 38 | startup_policy_order = '' 39 | ) 40 | else: 41 | return JobsetV1alpha2StartupPolicy( 42 | startup_policy_order = '', 43 | ) 44 | """ 45 | 46 | def testJobsetV1alpha2StartupPolicy(self): 47 | """Test JobsetV1alpha2StartupPolicy""" 48 | # inst_req_only = self.make_instance(include_optional=False) 49 | # inst_req_and_optional = self.make_instance(include_optional=True) 50 | 51 | if __name__ == '__main__': 52 | unittest.main() 53 | -------------------------------------------------------------------------------- /sdk/python/test/test_jobset_v1alpha2_success_policy.py: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | """ 4 | JobSet SDK 5 | 6 | Python SDK for the JobSet API 7 | 8 | The version of the OpenAPI document: v0.1.4 9 | Generated by OpenAPI Generator (https://openapi-generator.tech) 10 | 11 | Do not edit the class manually. 12 | """ # noqa: E501 13 | 14 | 15 | import unittest 16 | 17 | from jobset.models.jobset_v1alpha2_success_policy import JobsetV1alpha2SuccessPolicy 18 | 19 | class TestJobsetV1alpha2SuccessPolicy(unittest.TestCase): 20 | """JobsetV1alpha2SuccessPolicy unit test stubs""" 21 | 22 | def setUp(self): 23 | pass 24 | 25 | def tearDown(self): 26 | pass 27 | 28 | def make_instance(self, include_optional) -> JobsetV1alpha2SuccessPolicy: 29 | """Test JobsetV1alpha2SuccessPolicy 30 | include_optional is a boolean, when False only required 31 | params are included, when True both required and 32 | optional params are included """ 33 | # uncomment below to create an instance of `JobsetV1alpha2SuccessPolicy` 34 | """ 35 | model = JobsetV1alpha2SuccessPolicy() 36 | if include_optional: 37 | return JobsetV1alpha2SuccessPolicy( 38 | operator = '', 39 | target_replicated_jobs = [ 40 | '' 41 | ] 42 | ) 43 | else: 44 | return JobsetV1alpha2SuccessPolicy( 45 | operator = '', 46 | ) 47 | """ 48 | 49 | def testJobsetV1alpha2SuccessPolicy(self): 50 | """Test JobsetV1alpha2SuccessPolicy""" 51 | # inst_req_only = self.make_instance(include_optional=False) 52 | # inst_req_and_optional = self.make_instance(include_optional=True) 53 | 54 | if __name__ == '__main__': 55 | unittest.main() 56 | -------------------------------------------------------------------------------- /sdk/python/tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py3 3 | 4 | [testenv] 5 | deps=-r{toxinidir}/requirements.txt 6 | -r{toxinidir}/test-requirements.txt 7 | 8 | commands= 9 | pytest --cov=jobset 10 | -------------------------------------------------------------------------------- /site/.gitignore: -------------------------------------------------------------------------------- 1 | public/ 2 | 3 | # Modules generated by node.js for CSS editing 4 | node_modules/ 5 | 6 | # Resources directory generated by Hugo local build 7 | resources/ 8 | 9 | # Notebooks 10 | .ipynb_checkpoints 11 | # 12 | .hugo_build.lock 13 | -------------------------------------------------------------------------------- /site/OWNERS: -------------------------------------------------------------------------------- 1 | # See the OWNERS docs at https://go.k8s.io/owners 2 | 3 | approvers: 4 | - moficodes 5 | - kannon92 6 | -------------------------------------------------------------------------------- /site/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | draft: true 5 | --- 6 | -------------------------------------------------------------------------------- /site/content/en/_index.html: -------------------------------------------------------------------------------- 1 | --- 2 | type: html 3 | --- 4 | 5 | -------------------------------------------------------------------------------- /site/content/en/docs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Documentation" 3 | linkTitle: "Documentation" 4 | weight: 20 5 | menu: 6 | main: 7 | weight: 20 8 | --- 9 | -------------------------------------------------------------------------------- /site/content/en/docs/adopters/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Adopters" 3 | linkTitle: "Adopters" 4 | weight: 20 5 | menu: 6 | main: 7 | weight: 30 8 | description: > 9 | Where and how JobSet is used 10 | aliases: 11 | - /adopters 12 | --- 13 | 14 | Below is a list of organizations and projects that use JobSet in production along with the integrations they use. 15 | If you are using JobSet, feel free to open a pull request to update this list. 16 | 17 | ## Adopters 18 | 19 | | Organization | Description | Contact | 20 | | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------ | 21 | | [Google TPU Training](https://cloud.google.com/kubernetes-engine/docs/tutorials/tpu-multislice-kueue) | Large scale distributed AI/ML training on TPUs | [@ahg-g](https://github.com/ahg-g) | 22 | | [Kubeflow Trainer](https://github.com/kubeflow/trainer) | Job management for distributed AI/ML training | [@andreyvelich](https://github.com/andreyvelich) | 23 | -------------------------------------------------------------------------------- /site/content/en/docs/reference/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Reference" 3 | linkTitle: "Reference" 4 | weight: 9 5 | description: > 6 | This section contains the Jobset reference information. 7 | --- 8 | -------------------------------------------------------------------------------- /site/content/en/featured-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/content/en/featured-background.png -------------------------------------------------------------------------------- /site/content/en/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search Results 3 | layout: search 4 | 5 | --- 6 | 7 | -------------------------------------------------------------------------------- /site/layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ define "main"}} 2 |
3 |

404 Page not found

4 | 18 |
19 | {{ end }} -------------------------------------------------------------------------------- /site/layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | {{ $links := .Site.Params.links }} 2 | 29 | {{ define "footer-links-block" }} 30 | 39 | {{ end }} 40 | -------------------------------------------------------------------------------- /site/layouts/partials/navbar-version-selector.html: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /site/layouts/partials/seo_schema.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /site/layouts/shortcodes/blocks/content-item.html: -------------------------------------------------------------------------------- 1 | {{ $url_text := .Get "url_text" }} 2 |
3 | {{ with .Get "title" }}

{{ . }}

{{ end }} 4 | 5 |

{{ .Get "date" }}

6 | 7 |

{{ .Inner }}

8 | {{ with .Get "url" }}

{{ with $url_text }}{{ $url_text }}{{ else }}{{ "Read" }}{{ end }}

{{ end }} 9 |
10 | -------------------------------------------------------------------------------- /site/layouts/shortcodes/blocks/content-section.html: -------------------------------------------------------------------------------- 1 | {{ $col_id := .Get "color" | default .Ordinal }} 2 | {{ $height := .Get "height" | default "auto" }} 3 | 4 | 5 |
6 |
7 |

{{ .Get "title" | markdownify }}

8 |
9 | {{ .Inner }} 10 |
11 |
12 |
-------------------------------------------------------------------------------- /site/layouts/shortcodes/blocks/link-down.html: -------------------------------------------------------------------------------- 1 | {{ with .Parent }} 2 | {{ $id := $.Get "id" | default "overview" }} 3 | {{ $color := $.Get "color" | default "blue" }} 4 | 5 | {{ else }} 6 | {{ errorf "The link-down shortcode is supposed to be nested inside a shortcode"}} 7 | {{ end }} -------------------------------------------------------------------------------- /site/layouts/shortcodes/blocks/sample-section.html: -------------------------------------------------------------------------------- 1 | {{ $api := .Get "api" }} 2 | {{ $last_updated := "" }} 3 | {{ $version := .Get "kfctl" }} 4 |
5 | {{ with .Get "title" }}

{{ . }}

{{ end }} 6 | {{ with getJSON $api }} {{ $last_updated = (index (index (index (index . 0) "commit") "committer") "date") | dateFormat "2006/01/02" }} 7 |

{{ "Last update " }} {{ $last_updated }} {{ with $version }}{{ "Jobset " }}{{ . }}{{ end }}

{{ end }} 8 |

{{ .Inner }}

9 | {{ with .Get "url" }}

{{ "Go to sample" }}

{{ end }} 10 |
11 | -------------------------------------------------------------------------------- /site/layouts/shortcodes/blocks/tab.html: -------------------------------------------------------------------------------- 1 | {{ if .Parent }} 2 | {{ $name := trim (.Get "name") " " }} 3 | {{ $include := trim (.Get "include") " "}} 4 | {{ $codelang := .Get "codelang" }} 5 | {{ if not (.Parent.Scratch.Get "tabs") }} 6 | {{ .Parent.Scratch.Set "tabs" slice }} 7 | {{ end }} 8 | {{ with .Inner }} 9 | {{ if $codelang }} 10 | {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" (highlight . $codelang "") ) }} 11 | {{ else }} 12 | {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }} 13 | {{ end }} 14 | {{ else }} 15 | {{ $.Parent.Scratch.Add "tabs" (dict "name" $name "include" $include "codelang" $codelang) }} 16 | {{ end }} 17 | {{ else }} 18 | {{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}} 19 | {{ end}} 20 | -------------------------------------------------------------------------------- /site/layouts/shortcodes/needs-update.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /site/layouts/shortcodes/params.html: -------------------------------------------------------------------------------- 1 | {{- .Page.Param (.Get 0) -}} -------------------------------------------------------------------------------- /site/layouts/sitemap.xml: -------------------------------------------------------------------------------- 1 | 3 | {{ range .Data.Pages }} 4 | 5 | https://jobset.sigs.k8s.io{{ .Permalink }}{{ if not .Lastmod.IsZero }} 6 | {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} 7 | {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} 8 | {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} 9 | {{ end }} 14 | {{ end }} 19 | 20 | {{ end }} 21 | -------------------------------------------------------------------------------- /site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "autoprefixer": "^10.4.13", 4 | "docsy": "github:google/docsy", 5 | "postcss": "^8.5.3", 6 | "postcss-cli": "^10.1.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /site/static/examples/argo-workflow/rbac.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: argo-jobset 5 | namespace: argo 6 | --- 7 | apiVersion: rbac.authorization.k8s.io/v1 8 | kind: Role 9 | metadata: 10 | name: argo-jobset-role 11 | namespace: argo 12 | rules: 13 | - apiGroups: 14 | - batch 15 | resources: 16 | - jobs 17 | verbs: 18 | - create 19 | - delete 20 | - get 21 | - list 22 | - patch 23 | - update 24 | - watch 25 | - apiGroups: 26 | - batch 27 | resources: 28 | - jobs/status 29 | verbs: 30 | - get 31 | - patch 32 | - update 33 | - apiGroups: 34 | - "" 35 | resources: 36 | - pods 37 | verbs: 38 | - create 39 | - delete 40 | - get 41 | - list 42 | - patch 43 | - update 44 | - watch 45 | - apiGroups: 46 | - jobset.x-k8s.io 47 | resources: 48 | - jobsets 49 | verbs: 50 | - create 51 | - delete 52 | - get 53 | - list 54 | - patch 55 | - update 56 | - watch 57 | - apiGroups: 58 | - jobset.x-k8s.io 59 | resources: 60 | - jobsets/finalizers 61 | verbs: 62 | - update 63 | - apiGroups: 64 | - jobset.x-k8s.io 65 | resources: 66 | - jobsets/status 67 | verbs: 68 | - create 69 | - delete 70 | - get 71 | - list 72 | - patch 73 | - update 74 | - watch 75 | --- 76 | apiVersion: rbac.authorization.k8s.io/v1 77 | kind: RoleBinding 78 | metadata: 79 | name: argo-jobset-binding 80 | namespace: argo 81 | roleRef: 82 | apiGroup: rbac.authorization.k8s.io 83 | kind: Role 84 | name: argo-jobset-role 85 | subjects: 86 | - kind: ServiceAccount 87 | name: argo-jobset 88 | namespace: argo -------------------------------------------------------------------------------- /site/static/examples/client-go/README.md: -------------------------------------------------------------------------------- 1 | # JobSet Go client example 2 | 3 | The code in `main.go` shows a simple example of how you can programmatically create JobSets using 4 | JobSet's `client-go` package. 5 | 6 | To run it, simply run the command: 7 | 8 | ```bash 9 | go run main.go --kubeconfig $KUBE_CONFIG_FILEPATH 10 | ``` 11 | 12 | You should see the following output: 13 | 14 | ``` 15 | successfully created JobSet: test-js 16 | ``` -------------------------------------------------------------------------------- /site/static/examples/depends-on/multiple-depends-on.yaml: -------------------------------------------------------------------------------- 1 | # This example creates three ReplicatedJobs. 2 | # Then node ReplicatedJob waits until the dataset-intializer and model-initializer ReplicatedJob are Complete. 3 | apiVersion: jobset.x-k8s.io/v1alpha2 4 | kind: JobSet 5 | metadata: 6 | name: multiple-depends-on 7 | spec: 8 | replicatedJobs: 9 | - name: dataset-initializer 10 | template: 11 | spec: 12 | template: 13 | spec: 14 | containers: 15 | - name: initializer 16 | image: busybox 17 | command: 18 | - /bin/sh 19 | - -c 20 | - "echo 'dataset-initializer runs for 10 seconds' && sleep 10" 21 | - name: model-initializer 22 | template: 23 | spec: 24 | template: 25 | spec: 26 | containers: 27 | - name: initializer 28 | image: busybox 29 | command: 30 | - /bin/sh 31 | - -c 32 | - "echo 'model-initializer runs for 10 seconds' && sleep 10" 33 | - name: worker 34 | dependsOn: 35 | - name: dataset-initializer 36 | status: Complete 37 | - name: model-initializer 38 | status: Complete 39 | template: 40 | spec: 41 | parallelism: 4 42 | completions: 4 43 | template: 44 | spec: 45 | containers: 46 | - name: worker 47 | image: busybox 48 | command: 49 | - /bin/sh 50 | - -c 51 | - "echo 'worker runs for 20 seconds' && sleep 20" 52 | -------------------------------------------------------------------------------- /site/static/examples/failure-policy/failjobset-action.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: failjobset-action-example 5 | spec: 6 | failurePolicy: 7 | maxRestarts: 3 8 | rules: 9 | # The JobSet will fail immediately when the leader job fails. 10 | - action: FailJobSet 11 | targetReplicatedJobs: 12 | - leader 13 | replicatedJobs: 14 | - name: leader 15 | replicas: 1 16 | template: 17 | spec: 18 | # Set backoff limit to 0 so job will immediately fail if any pod fails. 19 | backoffLimit: 0 20 | completions: 2 21 | parallelism: 2 22 | template: 23 | spec: 24 | containers: 25 | - name: leader 26 | image: bash:latest 27 | command: 28 | - bash 29 | - -xc 30 | - | 31 | echo "JOB_COMPLETION_INDEX=$JOB_COMPLETION_INDEX" 32 | if [[ "$JOB_COMPLETION_INDEX" == "0" ]]; then 33 | for i in $(seq 10 -1 1) 34 | do 35 | echo "Sleeping in $i" 36 | sleep 1 37 | done 38 | exit 1 39 | fi 40 | for i in $(seq 1 1000) 41 | do 42 | echo "$i" 43 | sleep 1 44 | done 45 | - name: workers 46 | replicas: 1 47 | template: 48 | spec: 49 | backoffLimit: 0 50 | completions: 2 51 | parallelism: 2 52 | template: 53 | spec: 54 | containers: 55 | - name: worker 56 | image: bash:latest 57 | command: 58 | - bash 59 | - -xc 60 | - | 61 | sleep 1000 62 | -------------------------------------------------------------------------------- /site/static/examples/failure-policy/restartjobset-action.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: restartjobset-action-example 5 | spec: 6 | failurePolicy: 7 | maxRestarts: 3 8 | rules: 9 | # The JobSet will restart when the leader job fails. 10 | - action: RestartJobSet 11 | targetReplicatedJobs: 12 | - leader 13 | replicatedJobs: 14 | - name: leader 15 | replicas: 1 16 | template: 17 | spec: 18 | # Set backoff limit to 0 so job will immediately fail if any pod fails. 19 | backoffLimit: 0 20 | completions: 2 21 | parallelism: 2 22 | template: 23 | spec: 24 | containers: 25 | - name: leader 26 | image: bash:latest 27 | command: 28 | - bash 29 | - -xc 30 | - | 31 | echo "JOB_COMPLETION_INDEX=$JOB_COMPLETION_INDEX" 32 | if [[ "$JOB_COMPLETION_INDEX" == "0" ]]; then 33 | for i in $(seq 10 -1 1) 34 | do 35 | echo "Sleeping in $i" 36 | sleep 1 37 | done 38 | exit 1 39 | fi 40 | for i in $(seq 1 1000) 41 | do 42 | echo "$i" 43 | sleep 1 44 | done 45 | - name: workers 46 | replicas: 1 47 | template: 48 | spec: 49 | backoffLimit: 0 50 | completions: 2 51 | parallelism: 2 52 | template: 53 | spec: 54 | containers: 55 | - name: worker 56 | image: bash:latest 57 | command: 58 | - bash 59 | - -xc 60 | - | 61 | sleep 1000 62 | -------------------------------------------------------------------------------- /site/static/examples/prometheus-operator/prometheus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/examples/prometheus-operator/prometheus.png -------------------------------------------------------------------------------- /site/static/examples/pytorch/cnn-mnist/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM pytorch/pytorch:latest 2 | RUN pip install tqdm 3 | COPY mnist.py mnist.py 4 | CMD printenv 5 | -------------------------------------------------------------------------------- /site/static/examples/pytorch/cnn-mnist/mnist.yaml: -------------------------------------------------------------------------------- 1 | # Distributed training of a traditional CNN model to do image classification 2 | # using the MNIST dataset and PyTorch. 3 | apiVersion: jobset.x-k8s.io/v1alpha2 4 | kind: JobSet 5 | metadata: 6 | name: pytorch 7 | spec: 8 | replicatedJobs: 9 | - name: workers 10 | template: 11 | spec: 12 | parallelism: 4 13 | completions: 4 14 | backoffLimit: 0 15 | template: 16 | spec: 17 | containers: 18 | - name: pytorch 19 | image: gcr.io/k8s-staging-jobset/pytorch-mnist:latest 20 | ports: 21 | - containerPort: 3389 22 | env: 23 | - name: MASTER_ADDR 24 | value: "pytorch-workers-0-0.pytorch" 25 | - name: MASTER_PORT 26 | value: "3389" 27 | - name: RANK 28 | valueFrom: 29 | fieldRef: 30 | fieldPath: metadata.annotations['batch.kubernetes.io/job-completion-index'] 31 | # Force python to not buffer output and write directly to stdout, so we can view training logs via `kubectl logs`. 32 | - name: PYTHONUNBUFFERED 33 | value: "0" 34 | command: 35 | - bash 36 | - -xc 37 | - | 38 | torchrun --rdzv_id=123 --nnodes=4 --nproc_per_node=1 --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT --node_rank=$RANK mnist.py --epochs=1 --log-interval=1 -------------------------------------------------------------------------------- /site/static/examples/pytorch/resnet-cifar10/resnet.yaml: -------------------------------------------------------------------------------- 1 | # Distributed training of a ResNet18 model to do image classification 2 | # using the CIFAR-10 dataset and PyTorch. 3 | apiVersion: jobset.x-k8s.io/v1alpha2 4 | kind: JobSet 5 | metadata: 6 | name: pytorch 7 | spec: 8 | replicatedJobs: 9 | - name: workers 10 | template: 11 | spec: 12 | parallelism: 4 13 | completions: 4 14 | backoffLimit: 0 15 | template: 16 | spec: 17 | containers: 18 | - name: pytorch 19 | image: gcr.io/k8s-staging-jobset/pytorch-resnet:latest 20 | ports: 21 | - containerPort: 3389 22 | env: 23 | - name: MASTER_ADDR 24 | value: "pytorch-workers-0-0.pytorch" 25 | - name: MASTER_PORT 26 | value: "3389" 27 | # Force python to not buffer output and write directly to stdout, so we can view training logs via `kubectl logs`. 28 | - name: PYTHONUNBUFFERED 29 | value: "0" 30 | command: 31 | - bash 32 | - -xc 33 | - | 34 | torchrun --nproc_per_node=1 --master_addr=$MASTER_ADDR --master_port=$MASTER_PORT resnet.py --backend=gloo --num_epochs=2 35 | -------------------------------------------------------------------------------- /site/static/examples/simple/coordinator.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: coordinator-example 5 | spec: 6 | # label and annotate jobs and pods with stable network endpoint of the designated 7 | # coordinator pod: 8 | # jobset.sigs.k8s.io/coordinator=coordinator-example-driver-0-0.coordinator-example 9 | coordinator: 10 | replicatedJob: driver 11 | jobIndex: 0 12 | podIndex: 0 13 | replicatedJobs: 14 | - name: workers 15 | template: 16 | spec: 17 | parallelism: 4 18 | completions: 4 19 | backoffLimit: 0 20 | template: 21 | spec: 22 | containers: 23 | - name: sleep 24 | image: busybox 25 | command: 26 | - sleep 27 | args: 28 | - 100s 29 | - name: driver 30 | template: 31 | spec: 32 | parallelism: 1 33 | completions: 1 34 | backoffLimit: 0 35 | template: 36 | spec: 37 | containers: 38 | - name: sleep 39 | image: busybox 40 | command: 41 | - sleep 42 | args: 43 | - 100s 44 | -------------------------------------------------------------------------------- /site/static/examples/simple/exclusive-placement.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: exclusive-placement 5 | annotations: 6 | alpha.jobset.sigs.k8s.io/exclusive-topology: cloud.google.com/gke-nodepool # 1:1 job replica to node pool assignment 7 | spec: 8 | failurePolicy: 9 | maxRestarts: 3 10 | replicatedJobs: 11 | - name: workers 12 | replicas: 3 # set to number of node pools 13 | template: 14 | spec: 15 | parallelism: 3 16 | completions: 3 17 | backoffLimit: 10 18 | template: 19 | spec: 20 | containers: 21 | - name: sleep 22 | image: busybox 23 | command: 24 | - sleep 25 | args: 26 | - 1000s 27 | -------------------------------------------------------------------------------- /site/static/examples/simple/group.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: group-example 5 | spec: 6 | replicatedJobs: 7 | - name: rj-1 8 | # Label and annotate jobs and pods with group data 9 | # 10 | # Group data: 11 | # jobset.sigs.k8s.io/group-name=default 12 | # jobset.sigs.k8s.io/group-replicas=1 13 | # jobset.sigs.k8s.io/job-group-index=0 14 | # 15 | # Global data for reference: 16 | # jobset.sigs.k8s.io/global-replicas=2 17 | # jobset.sigs.k8s.io/job-global-index=0 18 | # 19 | # Implicitly, groupName: default 20 | replicas: 1 21 | template: 22 | spec: 23 | parallelism: 2 24 | completions: 2 25 | backoffLimit: 0 26 | template: 27 | spec: 28 | containers: 29 | - name: sleep 30 | image: busybox 31 | command: 32 | - sleep 33 | args: 34 | - 100s 35 | - name: rj-2 36 | # Label and annotate jobs and pods with group data 37 | # 38 | # Group data: 39 | # jobset.sigs.k8s.io/group-name=group-b 40 | # jobset.sigs.k8s.io/group-replicas=1 41 | # jobset.sigs.k8s.io/job-group-index=0 42 | # 43 | # Global data for reference: 44 | # jobset.sigs.k8s.io/global-replicas=2 45 | # jobset.sigs.k8s.io/job-global-index=1 46 | groupName: group-b 47 | replicas: 1 48 | template: 49 | spec: 50 | parallelism: 2 51 | completions: 2 52 | backoffLimit: 0 53 | template: 54 | spec: 55 | containers: 56 | - name: sleep 57 | image: busybox 58 | command: 59 | - sleep 60 | args: 61 | - 100s 62 | -------------------------------------------------------------------------------- /site/static/examples/simple/paralleljobs.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: paralleljobs 5 | spec: 6 | replicatedJobs: 7 | - name: workers 8 | template: 9 | spec: 10 | parallelism: 4 11 | completions: 4 12 | backoffLimit: 0 13 | template: 14 | spec: 15 | containers: 16 | - name: sleep 17 | image: busybox 18 | command: 19 | - sleep 20 | args: 21 | - 100s 22 | - name: driver 23 | template: 24 | spec: 25 | parallelism: 1 26 | completions: 1 27 | backoffLimit: 0 28 | template: 29 | spec: 30 | containers: 31 | - name: sleep 32 | image: busybox 33 | command: 34 | - sleep 35 | args: 36 | - 100s 37 | 38 | -------------------------------------------------------------------------------- /site/static/examples/simple/success-policy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: success-policy 5 | spec: 6 | # We want to declare our JobSet successful if workers finish. 7 | # If workers finish we should clean up the remaining replicatedJobs. 8 | successPolicy: 9 | operator: All 10 | targetReplicatedJobs: 11 | - workers 12 | replicatedJobs: 13 | - name: leader 14 | replicas: 1 15 | template: 16 | spec: 17 | # Set backoff limit to 0 so job will immediately fail if any pod fails. 18 | backoffLimit: 0 19 | completions: 1 20 | parallelism: 1 21 | template: 22 | spec: 23 | containers: 24 | - name: leader 25 | image: bash:latest 26 | command: 27 | - bash 28 | - -xc 29 | - | 30 | sleep 10000 31 | - name: workers 32 | replicas: 1 33 | template: 34 | spec: 35 | backoffLimit: 0 36 | completions: 2 37 | parallelism: 2 38 | template: 39 | spec: 40 | containers: 41 | - name: worker 42 | image: bash:latest 43 | command: 44 | - bash 45 | - -xc 46 | - | 47 | sleep 10 -------------------------------------------------------------------------------- /site/static/examples/simple/ttl-after-finished.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: jobset-with-ttl 5 | spec: 6 | ttlSecondsAfterFinished: 60 7 | replicatedJobs: 8 | - name: workers 9 | template: 10 | spec: 11 | parallelism: 4 12 | completions: 4 13 | backoffLimit: 0 14 | template: 15 | spec: 16 | containers: 17 | - name: sleep 18 | image: busybox 19 | command: 20 | - sleep 21 | args: 22 | - 100s -------------------------------------------------------------------------------- /site/static/examples/startup-policy/startup-driver-ready.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: startup-driver-ready 5 | spec: 6 | startupPolicy: 7 | startupPolicyOrder: InOrder 8 | replicatedJobs: 9 | - name: driver 10 | template: 11 | spec: 12 | parallelism: 1 13 | completions: 1 14 | backoffLimit: 0 15 | template: 16 | spec: 17 | containers: 18 | - name: sleep 19 | image: busybox 20 | command: 21 | - sleep 22 | args: 23 | - 1000s 24 | readinessProbe: 25 | exec: 26 | command: 27 | - echo 28 | - "ready" 29 | initialDelaySeconds: 30 30 | - name: workers 31 | template: 32 | spec: 33 | parallelism: 4 34 | completions: 4 35 | backoffLimit: 0 36 | template: 37 | spec: 38 | containers: 39 | - name: sleep 40 | image: busybox 41 | command: 42 | - sleep 43 | args: 44 | - 100s 45 | 46 | -------------------------------------------------------------------------------- /site/static/examples/tensorflow/mnist.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: jobset.x-k8s.io/v1alpha2 2 | kind: JobSet 3 | metadata: 4 | name: tensorflow 5 | spec: 6 | replicatedJobs: 7 | - name: tensorflow 8 | template: 9 | spec: 10 | parallelism: 2 11 | completions: 2 12 | backoffLimit: 5 13 | template: 14 | spec: 15 | containers: 16 | - name: tensorflow 17 | image: docker.io/kubeflowkatib/tf-mnist-with-summaries:latest 18 | command: 19 | - "python" 20 | - "/opt/tf-mnist-with-summaries/mnist.py" 21 | - "--epochs=1" 22 | - "--log-path=/mnist-with-summaries-logs" -------------------------------------------------------------------------------- /site/static/favicons/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/favicons/android-chrome-192x192.png -------------------------------------------------------------------------------- /site/static/favicons/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/favicons/android-chrome-512x512.png -------------------------------------------------------------------------------- /site/static/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /site/static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /site/static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /site/static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/favicons/favicon.ico -------------------------------------------------------------------------------- /site/static/favicons/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /site/static/images/jobset_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubernetes-sigs/jobset/a7a669590b3483715c193e0af53dbb5f4f066b03/site/static/images/jobset_diagram.png -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | placeholder -------------------------------------------------------------------------------- /test/e2e/config/image_pull_policy.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: controller-manager 5 | namespace: system 6 | spec: 7 | template: 8 | spec: 9 | containers: 10 | - name: manager 11 | imagePullPolicy: IfNotPresent 12 | -------------------------------------------------------------------------------- /test/e2e/config/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | 4 | resources: 5 | - ../../../config/default 6 | 7 | patches: 8 | - path: image_pull_policy.yaml --------------------------------------------------------------------------------