-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Remove operator-sdk new|add api commands and ansible scaffolding. #3531
Remove operator-sdk new|add api commands and ansible scaffolding. #3531
Conversation
.travis.yml
Outdated
@@ -117,6 +117,7 @@ jobs: | |||
## Operator test stage jobs ## | |||
|
|||
# Build and test ansible and test ansible using molecule | |||
# TODO: Replace with the required scripts after ansible plugin PR is merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving install set up here, thought not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
hack/tests/e2e-ansible.sh
Outdated
|
||
popd | ||
popd | ||
# TODO: Include test script after ansible plugins PR is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove the full file and target.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but do not need to do it in this PR we can do in a follow-up. Let's save Travis cycles.
.travis.yml
Outdated
@@ -125,7 +126,6 @@ jobs: | |||
- pip install --user ansible | |||
script: | |||
- make test-e2e-ansible | |||
- make test-e2e-ansible-molecule | |||
|
|||
# Test subcommands | |||
- <<: *test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shows that we can remove all: /operator-sdk/internal/scaffold/
Required check if has some part of code which will require it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of it is still used while scaffolding kustomize templates (eg: in generate/kustomize/manifests.go
) and in add crd
.
With the removal of add crd
, Ill clean up internal/scaffold too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
You can remove it if pass in the CI and then we can do follow-ups with what can be missing here👍
hack/tests/e2e-ansible-molecule.sh
Outdated
@@ -1,69 +0,0 @@ | |||
#!/usr/bin/env bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fabianvf since you are modifying this file for the ansible-plugin, I assume @varshaprasad96 should leave this file untouched?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they've been rewritten in the scaffold PR, this will just cause a conflict
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ill add this, and comment the targets in Makefile where its called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e2e tests will fail if the scaffolding is removed. so we either need to block this PR on the plugin PR
Or have the plugin PR rebase and re-add these tests.
Either way is fine by me.
/hold Will make changes after #3488 gets merged. |
eef7771
to
7f1b536
Compare
7f1b536
to
04658a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Just one question
This commit does the following: 1. Remove operator-sdk new and operator-sdk add api in favour of ansible plugins. 2. Remove ansible scaffolding (ie) internal/scaffold/ansible. 3. Remove internal/flags/apiflags/flags.go and relevant tests which were used in the commands. 4. Update IsOperatorAnsible() to check only for new layouts. 5. Remove hack/tests/e2e-ansible-molecule.sh and rewrite hack/tests/e2e-ansible.sh (which will get updated after ansible plugins).
04658a8
to
f8f203c
Compare
New changes are detected. LGTM label has been removed. |
Description of the change:
Remove operator-sdk new|add api commands and ansible scaffolding.
This commit does the following:
operator-sdk new
andoperator-sdk add api
in favour of ansible plugins.internal/scaffold/ansible
.internal/flags/apiflags/flags.go
and relevant tests which were used in the commands.IsOperatorAnsible()
to check only for new layouts.Motivation for the change:
Remove support for legacy commands and layouts in Operator SDK 1.0
Things to-do in follow up PR:
operator-sdk add crd
and relevant crd generator code/its tests which are not used.cmd/operator-sdk/main.go
c/c @joelanford @jmrodri @camilamacedo86 @fabianvf
Summary of changes:
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs