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
While starting Controller, ensure ThirdPartyResource "Alert" #29
Conversation
cmd/searchlight/app/watcher.go
Outdated
@@ -18,6 +18,7 @@ type Watcher struct { | |||
func (watch *Watcher) Run() { | |||
watch.Watcher.Dispatch = watch.Dispatch | |||
watch.Storage = &stash.Storage{} | |||
watch.setup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make setup as the first line. move
watch.Watcher.Dispatch = watch.Dispatch
watch.Storage = &stash.Storage{}
inside setup.
) | ||
|
||
func CreateThirdPartyResource(kubeClient clientset.Interface) error { | ||
_, err := kubeClient.Extensions().ThirdPartyResources().Get("alert.appscode.com") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use "alert" + "." + aci.V1beta1SchemeGroupVersion.Group
}, | ||
Versions: []extensions.APIVersion{ | ||
{ | ||
Name: "v1beta1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use aci.V1beta1SchemeGroupVersion.Version
LGTM |
If not available, create ThirdPartyResource