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

internal/plugins: update instead of overwrite samples kustomization #3645

Conversation

estroz
Copy link
Member

@estroz estroz commented Aug 4, 2020

Description of the change:

  • internal/plugins/manifests: add samples kustomization scaffold
  • internal/plugins/{ansible,golang,helm}: update RunCreateAPI() call with the scaffolded resource

Motivation for the change: This commit adds a scaffold marker +kubebuilder:scaffold:manifestskustomizesamples to config/samples/kustomization.yaml so that this file can be updated with new CR files without being completely overwritten. Users should now be able to add multiple samples of their CRDs to their samples kustomization.

Closes #3370

/cc @joelanford @asmacdo @fabianvf @camilamacedo86

Checklist

If the pull request includes user-facing changes, extra documentation is required:

…stomizesamples`

to `config/samples/kustomization.yaml` so that this file can be updated
with new CR files without being completely overwritten.

internal/plugins/manifests: add samples kustomization scaffold

internal/plugins/{ansible,golang,helm}: update RunCreateAPI() call with
the scaffolded resource
file.TemplateMixin

// GroupVersionKind is the sample's gvk to add to this scaffold.
GroupVersionKind config.GVK
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'm using a config.GVK here since this plugin shouldn't "known" about the resource a phase 1 plugin created or how it was created (namespaced? native API?), just what's in the config file.

Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 5, 2020
@estroz estroz merged commit f20a796 into operator-framework:master Aug 5, 2020
@estroz estroz deleted the feature/update-samples-kustomization branch August 5, 2020 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve SDK post actions customizations
3 participants