-
Notifications
You must be signed in to change notification settings - Fork 34
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
feat/330/add destination status #343
Conversation
@@ -105,13 +105,13 @@ func (d *Destination) GetCleanup() string { | |||
|
|||
// DestinationStatus defines the observed state of Destination | |||
type DestinationStatus struct { | |||
// INSERT ADDITIONAL STATUS FIELD - define observed state of destination | |||
// Important: Run "make" to regenerate code after modifying this file | |||
Conditions []metav1.Condition `json:"conditions,omitempty"` |
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.
love that we still have scaffolded code from 3 years ago
// +kubebuilder:object:root=true | ||
// +kubebuilder:subresource:status | ||
// +kubebuilder:resource:scope=Cluster,path=destinations,categories=kratix | ||
// +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`,description="Indicates the destination is ready to use" | ||
|
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.
nice touch for the additional printed column!
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.
LGTM!
The only additional thing is that do you think we could check the existence of statestore in the destination webhook and fail early? Is that beneficial for user experience or does that creates a hard ordering dependency of destination -> statestore.
Good shout... I think i'm more inclined to not force the ordering though; that's would also be consistent with other k8s resources? like if you have a deployment mounting a configmap that does not exist it accepts the creation just fine. That said, a |
@kirederik a warning sounds like a nice middle ground. Issue: #345 |
this PR closes #330