Skip to content

Commit

Permalink
Improve the API generated docs for managedBy
Browse files Browse the repository at this point in the history
  • Loading branch information
mimowo committed May 9, 2024
1 parent 7752a36 commit ab6f0f4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
13 changes: 12 additions & 1 deletion api/jobset/v1alpha2/jobset_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,18 @@ type JobSetSpec struct {
// Suspend suspends all running child Jobs when set to true.
Suspend *bool `json:"suspend,omitempty"`

// ManagedBy is used to indicate the controller or entity that manages a JobSet
// ManagedBy is used to indicate the controller or entity that manages a JobSet.
// The built-in JobSet controller reconciles JobSets which don't have this
// field at all or the field value is the reserved string
// `jobset.sigs.k8s.io/jobset-controller`, but skips reconciling JobSets
// with a custom value for this field.
//
// The value must be a valid domain-prefixed path (e.g. acme.io/foo) -
// all characters before the first "/" must be a valid subdomain as defined
// by RFC 1123. All characters trailing the first "/" must be valid HTTP Path
// characters as defined by RFC 3986. The value cannot exceed 63 characters.
// The field is immutable.
// +optional
ManagedBy *string `json:"managedBy,omitempty"`

// TTLSecondsAfterFinished limits the lifetime of a JobSet that has finished
Expand Down
2 changes: 1 addition & 1 deletion api/jobset/v1alpha2/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions config/components/crd/bases/jobset.x-k8s.io_jobsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,19 @@ spec:
- message: Value is immutable
rule: self == oldSelf
managedBy:
description: ManagedBy is used to indicate the controller or entity
that manages a JobSet
description: |-
ManagedBy is used to indicate the controller or entity that manages a JobSet.
The built-in JobSet controller reconciles JobSets which don't have this
field at all or the field value is the reserved string
`jobset.sigs.k8s.io/jobset-controller`, but skips reconciling JobSets
with a custom value for this field.


The value must be a valid domain-prefixed path (e.g. acme.io/foo) -
all characters before the first "/" must be a valid subdomain as defined
by RFC 1123. All characters trailing the first "/" must be valid HTTP Path
characters as defined by RFC 3986. The value cannot exceed 63 characters.
The field is immutable.
type: string
network:
description: Network defines the networking options for the jobset.
Expand Down
2 changes: 1 addition & 1 deletion hack/python-sdk/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"$ref": "#/definitions/jobset.v1alpha2.FailurePolicy"
},
"managedBy": {
"description": "ManagedBy is used to indicate the controller or entity that manages a JobSet",
"description": "ManagedBy is used to indicate the controller or entity that manages a JobSet. The built-in JobSet controller reconciles JobSets which don't have this field at all or the field value is the reserved string `jobset.sigs.k8s.io/jobset-controller`, but skips reconciling JobSets with a custom value for this field.\n\nThe value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. The field is immutable.",
"type": "string"
},
"network": {
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/docs/JobsetV1alpha2JobSetSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ JobSetSpec defines the desired state of JobSet
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**failure_policy** | [**JobsetV1alpha2FailurePolicy**](JobsetV1alpha2FailurePolicy.md) | | [optional]
**managed_by** | **str** | ManagedBy is used to indicate the controller or entity that manages a JobSet | [optional]
**managed_by** | **str** | ManagedBy is used to indicate the controller or entity that manages a JobSet. The built-in JobSet controller reconciles JobSets which don't have this field at all or the field value is the reserved string `jobset.sigs.k8s.io/jobset-controller`, but skips reconciling JobSets with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. The field is immutable. | [optional]
**network** | [**JobsetV1alpha2Network**](JobsetV1alpha2Network.md) | | [optional]
**replicated_jobs** | [**list[JobsetV1alpha2ReplicatedJob]**](JobsetV1alpha2ReplicatedJob.md) | ReplicatedJobs is the group of jobs that will form the set. | [optional]
**startup_policy** | [**JobsetV1alpha2StartupPolicy**](JobsetV1alpha2StartupPolicy.md) | | [optional]
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/jobset/models/jobset_v1alpha2_job_set_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def failure_policy(self, failure_policy):
def managed_by(self):
"""Gets the managed_by of this JobsetV1alpha2JobSetSpec. # noqa: E501
ManagedBy is used to indicate the controller or entity that manages a JobSet # noqa: E501
ManagedBy is used to indicate the controller or entity that manages a JobSet. The built-in JobSet controller reconciles JobSets which don't have this field at all or the field value is the reserved string `jobset.sigs.k8s.io/jobset-controller`, but skips reconciling JobSets with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. The field is immutable. # noqa: E501
:return: The managed_by of this JobsetV1alpha2JobSetSpec. # noqa: E501
:rtype: str
Expand All @@ -123,7 +123,7 @@ def managed_by(self):
def managed_by(self, managed_by):
"""Sets the managed_by of this JobsetV1alpha2JobSetSpec.
ManagedBy is used to indicate the controller or entity that manages a JobSet # noqa: E501
ManagedBy is used to indicate the controller or entity that manages a JobSet. The built-in JobSet controller reconciles JobSets which don't have this field at all or the field value is the reserved string `jobset.sigs.k8s.io/jobset-controller`, but skips reconciling JobSets with a custom value for this field. The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first \"/\" must be a valid subdomain as defined by RFC 1123. All characters trailing the first \"/\" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. The field is immutable. # noqa: E501
:param managed_by: The managed_by of this JobsetV1alpha2JobSetSpec. # noqa: E501
:type: str
Expand Down

0 comments on commit ab6f0f4

Please sign in to comment.