-
Notifications
You must be signed in to change notification settings - Fork 530
Align FederatedTypeConfig API with K8s API conventions #885
Conversation
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.
Please add fixup commits where changes are required with the expectation of squashing before merge.
Once this PR is ready for merge, I'd also like to see helm chart sync and code generation changes separated into their own commits.
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.
@marun I resisted making most changes beyond just the API structs in order to keep the size of the PR down and to focus on what's most important for beta. I prefer to make the API interface and method changes in another PR. WDYT?
@marun Updated based on our offline conversation and squashed commits as requested. PTAL. |
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
@@ -122,6 +136,7 @@ type FederatedTypeConfig struct { | |||
// FederatedTypeConfigList contains a list of FederatedTypeConfig | |||
type FederatedTypeConfigList struct { | |||
metav1.TypeMeta `json:",inline"` | |||
// +optional |
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.
(No action required) ugh, why is this required again? It seems particularly odious to me without an accompanying comment. Is omitempty
not enough of an indication that it's optional, or would there be a case where the +optional
and omitempty
would diverge?
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.
It is highly recommended per https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#optional-vs-required in the event the backwards compatibility guarantee of omitempty
alone is not enough.
typeConfig.Status.StatusController = corev1a1.ControllerStatusNotRunning | ||
|
||
if typeConfig.Status.StatusController == nil { | ||
typeConfig.Status.StatusController = new(corev1a1.ControllerStatus) |
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.
(No action required) Ugh, I think StatusController
and PropagationController
are terrible names for fields indicating whether a controller is running or not.
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.
There will probably be another opportunity to update this post API review, but if we want to change these now is also a good time.
Please rebase |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: font The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@marun Updated and rebased. |
LGTM |
/lgtm |
Partial fix for #879.