generate bundle
: Support overwriting of annotations.yaml
#6860
+72
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change:
jitli@RedHat:~/work/src/github/sdk/operator-sdk$ ./build/operator-sdk generate bundle -h Flags: --channels string A comma-separated list of channels the bundle belongs to (default "alpha") --crds-dir string Directory to read cluster-ready CustomResoureDefinition manifests from. This option can only be used if --deploy-dir is set --default-channel string The default channel for the bundle --deploy-dir string Directory to read cluster-ready operator manifests from. If --crds-dir is not set, CRDs are ready from this directory. This option is mutually exclusive with --input-dir and piping to stdin --extra-service-accounts strings Names of service accounts, outside of the operator's Deployment account, that have bindings to {Cluster}Roles that should be added to the CSV -h, --help help for bundle --input-dir string Directory to read cluster-ready operator manifests from. This option is mutually exclusive with --deploy-dir/--crds-dir and piping to stdin. This option should not be passed an existing bundle directory, as this bundle will not contain the correct set of manifests required to generate a CSV. Use --kustomize-dir to pass a base CSV --kustomize-dir string Directory containing kustomize bases in a "bases" dir and a kustomization.yaml for operator-framework manifests (default "config/manifests") --manifests Generate bundle manifests --metadata Generate bundle metadata and Dockerfile --output-dir string Directory to write the bundle to --overwrite Overwrite the bundle's metadata and Dockerfile if they exist (default true) + --overwrite-annotations Only overwrite annotations.yaml without modifying bundle.Dockerfile --package string Bundle's package name -q, --quiet Run in quiet mode --stdout Write bundle manifest to stdout --use-image-digests Use SHA Digest for images -v, --version string Semantic version of the operator in the generated bundle. Only set if creating a new bundle or upgrading your operator Global Flags: --plugins strings plugin keys to be used for this subcommand execution --verbose Enable verbose logging
Motivation for the change:
--overwrite wipes out any additional labels on the bundle.Dockerfile.
Provide a new --overwrite-annotations option to support overwriting annotations only.
Closes #6787
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments
(seechangelog/fragments/00-template.yaml
)website/content/en/docs