Skip to content

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

Merged
hiddeco merged 16 commits intomainfrom
gitrepository-v1
Mar 29, 2023
Merged

GA: Promote GitRepository API to source.toolkit.fluxcd.io/v1#1056
hiddeco merged 16 commits intomainfrom
gitrepository-v1

Conversation

@stefanprodan
Copy link
Copy Markdown
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>
hiddeco added 2 commits March 28, 2023 13:45
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
Copy Markdown
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.

Comment thread config/crd/bases/source.toolkit.fluxcd.io_buckets.yaml
Copy link
Copy Markdown
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.

Comment thread api/v1/artifact_types.go
Comment thread api/v1/artifact_types.go Outdated
Comment thread api/v1/gitrepository_types.go Outdated
Comment thread api/v1/gitrepository_types.go
Comment thread api/v1/gitrepository_types.go Outdated
Comment thread api/v1/zz_generated.deepcopy.go Outdated
hiddeco added 2 commits March 28, 2023 16:57
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>
Comment thread controllers/gitrepository_controller.go
Comment thread controllers/gitrepository_controller.go
Comment thread controllers/storage.go Outdated
Comment thread controllers/storage.go
Comment thread docs/spec/v1/gitrepositories.md Outdated
Comment thread docs/spec/v1/gitrepositories.md Outdated
hiddeco added 3 commits March 29, 2023 00:00
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
Copy Markdown
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
Copy Markdown
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

None yet

Development

Successfully merging this pull request may close these issues.

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

4 participants