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

✨ Add go/v4-alpha base and migration guide from go/v3 to go/v4-alpha #3032

Merged
merged 6 commits into from
Nov 18, 2022

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Oct 22, 2022

Description

  • Address the main changes tracked to be applied in the new scaffold in order to clean up by removing the options that are no longer supported and the usage of k8s apis which does not work with k8s 1.22+ and 1.25+
  • Add migration guide and initial docs to allow users to migrate from go/v2 to the go/v4-alpha if they wish since we plan to remove the go/v2 when we bump k8s 1.26 (we can improve the docs in follow-ups by providing further manual steps for example)
  • Allow us looking for to perform any required change in the go/v4-alpha golang base scaffold files as well before making it stable.

Motivation

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 22, 2022
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 22, 2022
@camilamacedo86 camilamacedo86 requested review from Kavinjsir and everettraven and removed request for everettraven October 22, 2022 09:20
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 22, 2022
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 22, 2022
@camilamacedo86 camilamacedo86 changed the title ✨ Add go/v4-alpha base and migration guide from go/v3 to go/v4-alpha WIP ✨ Add go/v4-alpha base and migration guide from go/v3 to go/v4-alpha Oct 23, 2022
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 23, 2022
@camilamacedo86 camilamacedo86 changed the title WIP ✨ Add go/v4-alpha base and migration guide from go/v3 to go/v4-alpha ✨ Add go/v4-alpha base and migration guide from go/v3 to go/v4-alpha Oct 23, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 23, 2022
@camilamacedo86
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Oct 24, 2022
Copy link
Contributor

@Kavinjsir Kavinjsir left a comment

Choose a reason for hiding this comment

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

Thx @camilamacedo86 !
Added some nits.
I will go for some practices following the docs to finish my review.

docs/book/src/migration/legacy.md Outdated Show resolved Hide resolved
docs/book/src/migration/legacy.md Outdated Show resolved Hide resolved
docs/book/src/migration/legacy.md Outdated Show resolved Hide resolved
docs/book/src/migration/v3vsv4.md Outdated Show resolved Hide resolved
docs/book/src/migration/v3vsv4.md Outdated Show resolved Hide resolved

## Common changes

- `go/v4-alpha` projects use Kustomize v4x (instead of v3x)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nits:

use Kustomize v4.x.x (instead of v3.x.x)

Copy link
Member Author

Choose a reason for hiding this comment

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

In this case is 4x because we can bump the version.
The breaking changes are only faced in the major bump from 3x to 4x

Copy link
Contributor

Choose a reason for hiding this comment

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

That makes sense. 👍🏼

docs/book/src/migration/migration_guide_gov3_to_gov4.md Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 25, 2022
@camilamacedo86
Copy link
Member Author

camilamacedo86 commented Oct 25, 2022

Hi @Kavinjsir,

Thank you for the help. Mainly all suggestions are applied.

Copy link
Contributor

@Kavinjsir Kavinjsir left a comment

Choose a reason for hiding this comment

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

lgtm!

- no longer provide backwards compatible support with k8s versions < `1.16`

<aside class="note">
<H1> TL;DR of the New `go/v4-alpha` Plugin </H1>
Copy link
Contributor

Choose a reason for hiding this comment

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

See that below contains another tldr header with contents. Do we need this h1 block?

Copy link
Member Author

Choose a reason for hiding this comment

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

All notes have that. It creates a title @Kavinjsir

p.resource = res

// TODO: re-evaluate whether y/n input still makes sense. We should probably always
// scaffold the resource and controller.
Copy link
Contributor

Choose a reason for hiding this comment

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

Agree to directly generate resources and controller code with asking users.
Assuming these are the common patterns to implement CRD operators.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hun, we need to remove this TODO.
It cames from the go v3 code as well.
We need to have the Y/N option. WHY?

We can reconcile a Kind that is not owned by the project.
That can be a core type (i.e Deployments) or an external/third-party one like a CRD created by other projects. See: #3082

Lets remove it in a follow up.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. Makes sense to leave options for users considering on such wider use cases.

Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

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

Nits on doc. Else looks good to me! 👍

docs/book/src/migration/multi-group.md Outdated Show resolved Hide resolved
docs/book/src/migration/v3vsv4.md Outdated Show resolved Hide resolved
docs/book/src/migration/v3vsv4.md Outdated Show resolved Hide resolved
docs/book/src/migration/v3vsv4.md Outdated Show resolved Hide resolved
docs/book/src/plugins/to-be-extended.md Outdated Show resolved Hide resolved
@camilamacedo86
Copy link
Member Author

camilamacedo86 commented Nov 17, 2022

Thank you for the review @varshaprasad96
All addressed!

Co-authored-by: Varsha <varshaprasad96@gmail.com>
@camilamacedo86
Copy link
Member Author

@varshaprasad96 @everettraven @Kavinjsir could you help us move with this one?

Copy link
Contributor

@Kavinjsir Kavinjsir left a comment

Choose a reason for hiding this comment

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

Looks good to me!

p.resource = res

// TODO: re-evaluate whether y/n input still makes sense. We should probably always
// scaffold the resource and controller.
Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. Makes sense to leave options for users considering on such wider use cases.

Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

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

Just a few more nits in doc. After they are addressed its /lgtm from my end.

docs/book/src/plugins/go-v4-plugin.md Outdated Show resolved Hide resolved
docs/book/src/migration/legacy.md Outdated Show resolved Hide resolved
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, Kavinjsir, varshaprasad96

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [camilamacedo86,varshaprasad96]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

camilamacedo86 and others added 5 commits November 18, 2022 06:59
Co-authored-by: Varsha <varshaprasad96@gmail.com>
Co-authored-by: Varsha <varshaprasad96@gmail.com>
Co-authored-by: Varsha <varshaprasad96@gmail.com>
Co-authored-by: Varsha <varshaprasad96@gmail.com>
Co-authored-by: Varsha <varshaprasad96@gmail.com>
@camilamacedo86 camilamacedo86 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 18, 2022
@camilamacedo86
Copy link
Member Author

Moving forward with this one since we got enough reviews!
Thank you @varshaprasad96 and @Kavinjsir

@k8s-ci-robot k8s-ci-robot merged commit 1f099ea into kubernetes-sigs:master Nov 18, 2022
@camilamacedo86 camilamacedo86 deleted the go-v4-base branch November 18, 2022 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
4 participants