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

generate (new CLI): change default output dirs #3257

Merged

Conversation

estroz
Copy link
Member

@estroz estroz commented Jun 18, 2020

Description of the change:
*: remove config/ prefix for generated manifests/metadata for both bundles and package manifests

Motivation for the change: bundle and packagemanifests default output paths are changing because generated files do not require further kustomization and so should not reside in config/ with other kustomizeable manifests.

  • bundle will write manifests/metadata to the top-level bundle/ directory
  • packagemanifests will write manifests and the package manifest to the top-level packagemanifests/ directory

This PR also leverages generate kustomize manifests, added in #3258.

/cc @hasbro17 @joelanford @jmrodri @bharathi-tenneti

/kind feature

@estroz
Copy link
Member Author

estroz commented Jun 18, 2020

/hold

Blocked by #3258

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 18, 2020
@estroz estroz changed the title generate (new CLI): add kustomize subcommand, change default output dirs generate (new CLI): change default output dirs Jun 18, 2020
@estroz
Copy link
Member Author

estroz commented Jun 18, 2020

/remove-kind feature

@openshift-ci-robot openshift-ci-robot removed the kind/feature Categorizes issue or PR as related to a new feature. label Jun 18, 2020
@estroz estroz force-pushed the refactor/rename-generate-defaults branch from a1e7d15 to 87dce21 Compare June 18, 2020 03:09
…elated files;

instead, `generate kustomize manifests` will do so.

`bundle` will write manifests/metadata to the top-level `bundle/` directory,
and `packagemanifests` will write manifests and the package manifest to
the top-level `packagemanifests/`; these are deployable files that do not
require further kustomization, so should not reside in `config/`.

*: remove `config/` prefix for generated manifests/metadata, change
`config/{bundle,packagemanifests}` to `config/manifests` in `--kustomize`
logic
@estroz estroz force-pushed the refactor/rename-generate-defaults branch from 87dce21 to eadf808 Compare June 18, 2020 20:27
@estroz
Copy link
Member Author

estroz commented Jun 18, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 18, 2020
Comment on lines +120 to +121
if c.kustomizeDir == "" {
return errors.New("--kustomize-dir must be set")
Copy link
Contributor

Choose a reason for hiding this comment

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

So --kustomize-dir seems to be a required flag now. Unless it should be defaulted to config/manifests.
Can we mark it as such, and also I didn't see it used in the example text:

$ kustomize build config/manifests | operator-sdk generate bundle --manifests --metadata --overwrite --version 0.0.1

Copy link
Member Author

@estroz estroz Jun 19, 2020

Choose a reason for hiding this comment

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

This flag is required but defaults to config/manifests.

Copy link
Member

Choose a reason for hiding this comment

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

Just double checking. It is required in the sense that it can't be empty, but not required in the sense that it doesn't have to be provided on the command line?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, much like --deploy-dir in the legacy CLI.

@estroz estroz force-pushed the refactor/rename-generate-defaults branch from 22f054d to cba74f0 Compare June 19, 2020 06:06
@estroz estroz requested a review from hasbro17 June 19, 2020 06:07
@estroz estroz force-pushed the refactor/rename-generate-defaults branch from cba74f0 to fd0fa16 Compare June 19, 2020 14:58
Copy link
Contributor

@hasbro17 hasbro17 left a comment

Choose a reason for hiding this comment

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

LGTM

@estroz estroz merged commit 0e7ba85 into operator-framework:master Jun 22, 2020
@estroz estroz deleted the refactor/rename-generate-defaults branch June 22, 2020 16:34
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.

None yet

4 participants