-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Minimal addon and declarative pattern implementations for addon operators #241
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package addon | ||
|
||
import ( | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
) | ||
|
||
type CommonObject interface { | ||
runtime.Object | ||
metav1.Object | ||
ComponentName() string | ||
CommonSpec() CommonSpec | ||
GetCommonStatus() CommonStatus | ||
SetCommonStatus(CommonStatus) | ||
} | ||
|
||
type CommonSpec struct { | ||
Version string `json:"version,omitempty"` | ||
Channel string `json:"channel,omitempty"` | ||
} | ||
|
||
//go:generate go run ../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./... | ||
|
||
// +k8s:deepcopy-gen=true | ||
type CommonStatus struct { | ||
Healthy bool `json:"healthy,omitempty"` | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should document what these type definition are and how are they suppose to be used. Also, would be good to include pkg level comments which makes Godoc useful in this case. I think some content from walkthrough be used in the pkg level doc.go in this case. |
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.
Is copyright missing ?