operator-sdk: Generating Manifests and Metadata page `--kustomize` flag not available

I am trying to create a bundle for submariner-operator by following the official “Generating manifests and metadata” guide. The page describes about passing --kustomize=false to disable the interactive prompt. However, when running the command generate kustomize manifests --kustomize=false, it throws an unknown flag error.

$ ./bin/operator-sdk generate kustomize manifests --kustomize=false
Error: unknown flag: --kustomize
Usage:
  operator-sdk generate kustomize manifests [flags]

Examples:

  $ operator-sdk generate kustomize manifests

  Display name for the operator (required):
  > memcached-operator
  ...

  $ tree config/manifests
  config/manifests
  ├── bases
  │   └── memcached-operator.clusterserviceversion.yaml
  └── kustomization.yaml

  # After generating kustomize bases and a kustomization.yaml, you can generate a bundle or package manifests.

  # To generate a bundle:
  $ kustomize build config/manifests | operator-sdk generate bundle --version 0.0.1

  # To generate package manifests:
  $ kustomize build config/manifests | operator-sdk generate packagemanifests --version 0.0.1


Flags:
      --apis-dir string     Root directory for API type defintions
  -h, --help                help for manifests
      --input-dir string    Directory containing existing kustomize files
      --interactive         When set to false, if no kustomize base exists, an interactive command prompt will be presented to accept non-inferrable metadata
      --output-dir string   Directory to write kustomize files
      --package string      Package name
  -q, --quiet               Run in quiet mode

Global Flags:
      --plugins strings   plugin keys to be used for this subcommand execution
      --verbose           Enable verbose logging

FATA[0000] unknown flag: --kustomize      

operator-sdk version: 1.23.0

$ ./bin/operator-sdk version                                       
operator-sdk version: "v1.23.0", commit: "1eaeb5adb56be05fe8cc6dd70517e441696846a4", kubernetes version: "1.24.2", go version: "go1.18.5", GOOS: "linux", GOARCH: "amd64"

kustomize version: 3.10.0 kubebuilder version: v3

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

@everettraven hey, thanks for looking into this. Yes, after renaming the fields, operator-sdk generate kustomize manifests completes and does not loop any longer. I am able to create to the bundle.

Also another doc related issue: kustomize files section in the official guide suggests that kustomization.yaml be under config/manifests/bases/ but shouldn’t it be under config/manifests/?