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

🌱 clean up samples by removing deprecated options #2741

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions test/testdata/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ function scaffold_test_project {
$kb create api --group crew --version v1 --kind Captain --controller=true --resource=true --make=false
$kb create api --group crew --version v1 --kind FirstMate --controller=true --resource=true --make=false
$kb create api --group crew --version v1 --kind Admiral --controller=true --resource=true --namespaced=false --make=false
elif [[ $project =~ v1beta1 ]]; then
header_text 'Creating APIs ...'
$kb create api --group crew --version v1 --kind Admiral --controller=true --resource=true --namespaced=false --make=false --crd-version=v1beta1
$kb create webhook --group crew --version v1 --kind Admiral --defaulting --webhook-version=v1beta1
fi

make generate manifests
Expand All @@ -123,12 +119,9 @@ build_kb

# Project version 2 uses plugin go/v2 (default).
scaffold_test_project project-v2 --project-version=2
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this one as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I do not think so.
Why? we need to ensure in the reviews that changes are not made in this scaffold.
By keeping it, we can easily check that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense

scaffold_test_project project-v2-multigroup --project-version=2
scaffold_test_project project-v2-addon --project-version=3 --plugins="go/v2,declarative"
# Project version 3 (default) uses plugin go/v3 (default).
scaffold_test_project project-v3
scaffold_test_project project-v3-multigroup
scaffold_test_project project-v3-addon --plugins="go/v3,declarative"
scaffold_test_project project-v3-config --component-config
scaffold_test_project project-v3-v1beta1
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with removing the v2 projects since they are being deprecated, but are we also deprecating the v1beta1 support for the go/v3 plugin? If not then I think we should keep this one in.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @everettraven.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we do not want anybody using v1neta1. It does not work since K8s >= 1.22 and the flag is deprecated across all places

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha, then this is good.

scaffold_test_project project-v3-with-kustomize-v2 --plugins="kustomize/v2-alpha,base.go.kubebuilder.io/v3"
3 changes: 1 addition & 2 deletions test/testdata/test_legacy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ build_kb
tools_k8s_version="1.19.2"
fetch_tools
test_project project-v2
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this one as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nops, since we will keep the sample

test_project project-v2-multigroup
test_project project-v2-addon

24 changes: 0 additions & 24 deletions testdata/project-v2-addon/.gitignore

This file was deleted.

34 changes: 0 additions & 34 deletions testdata/project-v2-addon/Dockerfile

This file was deleted.

125 changes: 0 additions & 125 deletions testdata/project-v2-addon/Makefile

This file was deleted.

49 changes: 0 additions & 49 deletions testdata/project-v2-addon/PROJECT

This file was deleted.

90 changes: 0 additions & 90 deletions testdata/project-v2-addon/api/v1/admiral_types.go

This file was deleted.

Loading