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

GA: Promote GitRepository API to source.toolkit.fluxcd.io/v1 #1056

Merged
merged 16 commits into from
Mar 29, 2023

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Mar 23, 2023

API changes

The GitRepository kind was promoted from v1beta2 to v1 (GA) and deprecated fields were removed.

The common types Artifact, Conditions and the Source interface were promoted to v1.

The gitrepositories.source.toolkit.fluxcd.io CRD contains the following versions:

  • v1 (storage version)
  • v1beta2 (deprecated)
  • v1beta1 (deprecated)

Upgrade

The GitRepository v1 API is backwards compatible with v1beta2 with the following exceptions:

  • the deprecated field .spec.gitImplementation was removed
  • the unused field .spec.accessFrom was removed
  • the deprecated field .status.contentConfigChecksum was removed
  • the deprecated field .status.artifact.checksum was removed
  • the .status.url was removed in favor of the absolute .status.artifact.url

To upgrade from v1beta2, after deploying the new CRD and controller, set apiVersion: source.toolkit.fluxcd.io/v1 in the YAML files that contain GitRepository definitions and remove the deprecated fields if any. Bumping the API version in manifests can be done gradually. It is advised to not delay this procedure as the beta versions will be removed after 6 months.

Closes: #947

@stefanprodan stefanprodan added this to the Bootstrap GA milestone Mar 23, 2023
@stefanprodan stefanprodan force-pushed the gitrepository-v1 branch 2 times, most recently from 5136db4 to 9a0a899 Compare March 23, 2023 20:59
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
stefanprodan and others added 6 commits March 23, 2023 23:33
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
makkes pushed a commit to fluxcd/website that referenced this pull request Mar 27, 2023
Signed-off-by: Max Jonas Werner <mail@makk.es>
@stefanprodan stefanprodan marked this pull request as ready for review March 27, 2023 17:54
@stefanprodan stefanprodan requested a review from a team March 27, 2023 17:55
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
makkes pushed a commit to fluxcd/website that referenced this pull request Mar 28, 2023
Signed-off-by: Max Jonas Werner <mail@makk.es>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Consumers still relying on this should make use of `v1beta2` to
facilitate any transition.

In addition, remove the `*Implementation` constants for now removed
Git implemenations.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Copy link
Member

@makkes makkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about the checksum-related changes in here but otherwise lgtm.

Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments while revising the APIs one last time before v1.

api/v1/artifact_types.go Show resolved Hide resolved
api/v1/artifact_types.go Outdated Show resolved Hide resolved
api/v1/gitrepository_types.go Outdated Show resolved Hide resolved
api/v1/gitrepository_types.go Show resolved Hide resolved
api/v1/gitrepository_types.go Outdated Show resolved Hide resolved
api/v1/zz_generated.deepcopy.go Outdated Show resolved Hide resolved
Usage of this field has not been recommended for a long time as it was
best-effort based.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Plus a switch from `godoc.org` -> `pkg.go.dev`.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
controllers/gitrepository_controller.go Show resolved Hide resolved
controllers/gitrepository_controller.go Show resolved Hide resolved
controllers/storage.go Outdated Show resolved Hide resolved
controllers/storage.go Show resolved Hide resolved
docs/spec/v1/gitrepositories.md Outdated Show resolved Hide resolved
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
- Use `kubectl events` in favor of `kubectl get events`.
- Remove deleted `URL` field from `Status` examples of `GitRepository`
  v1.

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco
Copy link
Member

hiddeco commented Mar 28, 2023

@darkowlzz think I managed to address all your comments.

@hiddeco hiddeco requested a review from darkowlzz March 29, 2023 07:00
Copy link
Contributor

@darkowlzz darkowlzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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

Successfully merging this pull request may close these issues.

GA: Promote GitRepository to source.toolkit.fluxcd.io/v1
4 participants