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

cmd/operator-sdk/add/controller.go: support built-in k8s API controllers #1344

Merged
merged 11 commits into from
May 17, 2019

Conversation

estroz
Copy link
Member

@estroz estroz commented Apr 23, 2019

Description of the change:
cmd/operator-sdk/add/controller.go: --k8s-api-import for scaffolding built-in and external Kubernetes API controllers
internal/pkg/scaffold/controller_kind*.go: set imports at runtime as to respect an API import

Motivation for the change: See #928 and #1343

Closes #1343

built-in Kubernetes API controllers

internal/pkg/scaffold/controller_kind*.go: set imports at runtime as to
respect a Kubernetes API controller import
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 23, 2019
cmd/operator-sdk/add/controller.go Outdated Show resolved Hide resolved
internal/pkg/scaffold/controller_kind.go Outdated Show resolved Hide resolved
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 25, 2019
@estroz estroz requested a review from lilic April 25, 2019 22:39
and optionally an import identifier for an expernal k8s API

internal/pkg/scaffold/controller_kind*.go: parse and set K8sImport
in template
Copy link
Member

@lilic lilic left a comment

Choose a reason for hiding this comment

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

Few nits, haven't had a chance to test this yet.

doc/sdk-cli-reference.md Outdated Show resolved Hide resolved
internal/pkg/scaffold/controller_kind.go Show resolved Hide resolved
internal/pkg/scaffold/controller_kind.go Show resolved Hide resolved
@estroz estroz requested a review from lilic May 7, 2019 16:40
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2019
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.

A couple of nits. Otherwise LGTM

internal/pkg/scaffold/controller_kind.go Outdated Show resolved Hide resolved
internal/pkg/scaffold/controller_kind.go Outdated Show resolved Hide resolved
Eric Stroczynski and others added 2 commits May 16, 2019 13:43
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 16, 2019
Copy link
Member

@lilic lilic left a comment

Choose a reason for hiding this comment

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

lgtm after rebase :)

@estroz estroz merged commit ff4dfb7 into operator-framework:master May 17, 2019
@estroz estroz deleted the k8s-api-controllers branch May 17, 2019 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use correct controller imports for Kubernetes native APIs
4 participants