Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update go/crd docs with semantic version info #2833

Open
fykaa opened this issue Oct 24, 2024 · 3 comments
Open

docs: update go/crd docs with semantic version info #2833

fykaa opened this issue Oct 24, 2024 · 3 comments

Comments

@fykaa
Copy link
Contributor

fykaa commented Oct 24, 2024

ref: #2521 (comment)

@fykaa
Copy link
Contributor Author

fykaa commented Oct 30, 2024

wrt this, I wanted to understand where this information would fit naturally

Imo, Reference Docs seems as it would be more contextually relevant to developers working directly with CRDs and Go based configurations

@krancour
Copy link
Member

krancour commented Oct 30, 2024

We can move this to be inline in the Go/CRD docs.

It turns out it is already mentioned here:

// SemverConstraint specifies constraints on what new image versions are
// permissible. The value in this field only has any effect when the
// ImageSelectionStrategy is SemVer or left unspecified (which is implicitly
// the same as SemVer). This field is also optional. When left unspecified,
// (and the ImageSelectionStrategy is SemVer or unspecified), there will be no
// constraints, which means the latest semantically tagged version of an image
// will always be used. Care should be taken with leaving this field
// unspecified, as it can lead to the unanticipated rollout of breaking
// changes. Refer to Image Updater documentation for more details.
// More info: https://github.com/masterminds/semver#checking-version-constraints
//
// +kubebuilder:validation:Optional
SemverConstraint string `json:"semverConstraint,omitempty" protobuf:"bytes,4,opt,name=semverConstraint"`

(Although the comment about referring to Image Updater documentation ought to be removed. That is leftover from a time when image selection functionality was borrowed from Image Updater. That is no longer the case.)

This is another spot where semver constraints are mentioned -- this time for commit selection:

// SemverConstraint specifies constraints on what new tagged commits are
// considered in determining the newest commit of interest. The value in this
// field only has any effect when the CommitSelectionStrategy is SemVer. This
// field is optional. When left unspecified, there will be no constraints,
// which means the latest semantically tagged commit will always be used. Care
// should be taken with leaving this field unspecified, as it can lead to the
// unanticipated rollout of breaking changes.
//
// +kubebuilder:validation:Optional
SemverConstraint string `json:"semverConstraint,omitempty" protobuf:"bytes,4,opt,name=semverConstraint"`

Run codegen after updating these comments.

Edit: codegen updates the CRDs with the new comments. Eventually, those changes surface here: https://doc.crds.dev/github.com/akuity/kargo

@krancour
Copy link
Member

@fykaa you could consider addressing #2880 in tandem with this as they are very closely related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants