Skip to content

[DON'T MERGE] example: the play project is a complete mock of what sdk generates#13

Closed
fanminshi wants to merge 1 commit intooperator-framework:masterfrom
fanminshi:mock
Closed

[DON'T MERGE] example: the play project is a complete mock of what sdk generates#13
fanminshi wants to merge 1 commit intooperator-framework:masterfrom
fanminshi:mock

Conversation

@fanminshi
Copy link
Copy Markdown
Contributor

@fanminshi fanminshi commented Feb 15, 2018

the example/play is a mock that contains what the operator-sdk output
when run:
operator-sdk github.com/example.com/play --api-group=play.example.com/v1alpha1

├── Gopkg.lock
├── Gopkg.toml
├── cmd
│   └── play
│       └── main.go
├── config
│   └── config.yaml
├── hack
│   ├── build
│   │   └── build.sh
│   └── codegen
│       ├── boilerplate.go.txt
│       ├── update-generated.sh
│       └── verify-generated.sh
└── pkg
    ├── apis
    │   └── play
    │       └── v1alpha1
    │           ├── doc.go
    │           ├── register.go
    │           ├── types.go
    │           └── zz_generated.deepcopy.go
    ├── client
    │   └── client.go
    ├── generated
    │   ├── clientset
    │   │   └── versioned
    │   │       ├── clientset.go
    │   │       ├── doc.go
    │   │       ├── fake
    │   │       │   ├── clientset_generated.go
    │   │       │   ├── doc.go
    │   │       │   └── register.go
    │   │       ├── scheme
    │   │       │   ├── doc.go
    │   │       │   └── register.go
    │   │       └── typed
    │   │           └── play
    │   │               └── v1alpha1
    │   │                   ├── doc.go
    │   │                   ├── fake
    │   │                   │   ├── doc.go
    │   │                   │   ├── fake_play_client.go
    │   │                   │   └── fake_playservice.go
    │   │                   ├── generated_expansion.go
    │   │                   ├── play_client.go
    │   │                   └── playservice.go
    │   ├── informers
    │   │   └── externalversions
    │   │       ├── factory.go
    │   │       ├── generic.go
    │   │       ├── internalinterfaces
    │   │       │   └── factory_interfaces.go
    │   │       └── play
    │   │           ├── interface.go
    │   │           └── v1alpha1
    │   │               ├── interface.go
    │   │               └── playservice.go
    │   └── listers
    │       └── play
    │           └── v1alpha1
    │               ├── expansion_generated.go
    │               └── playservice.go
    └── stub
        └── handler.go

@fanminshi fanminshi changed the title [DON'T MERGE] example: the play is a complete mock of what sdk generates [DON'T MERGE] example: the play project is a complete mock of what sdk generates Feb 15, 2018
}

func (h *Handler) Handle(ctx types.Context, event types.Event) {
// Fill me
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

create an ngix pod here.

Comment thread example/play/cmd/play/main.go Outdated
)

func main() {
namespace := "fill me"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

namespace := "fill me" -> namespace := "default"


func main() {
namespace := "default"
sdk.Watch(api.PlayServicePlural, namespace, api.PlayService)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sdk.Watch(api.PlayServicePlural, namespace, api.PlayService) ->
sdk.Watch(api.PlayServicePlural, namespace, api.PlayService, client.MustNewInCluster())

@fanminshi
Copy link
Copy Markdown
Contributor Author

closing this because this is no longer needed as operator-sdk 0.0.1 milestone is about to complete

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.

1 participant