├── .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 | {{ .DisplayName }}
13 | {{- else -}}
14 | {{ .DisplayName }}
15 | {{- end -}}
16 | {{- end }}
17 | {{ .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 | Field | Description |
---|---|
apiVersion string | {{- .APIGroup -}} |
kind string | {{- .Name.Name -}} |
{{ .Get "date" }}
6 | 7 |{{ .Inner }}
8 | {{ with .Get "url" }}{{ with $url_text }}{{ $url_text }}{{ else }}{{ "Read" }}{{ end }}
{{ end }} 9 |{{ "Last update " }} {{ $last_updated }} {{ with $version }}{{ "Jobset " }}{{ . }}{{ end }}
{{ end }} 8 |{{ .Inner }}
9 | {{ with .Get "url" }}{{ end }} 10 |