-
Notifications
You must be signed in to change notification settings - Fork 739
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: Support daemonset target kind #455
feat: Support daemonset target kind #455
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.
@mathetake thank you for this. Please change the Canary CRDs and add DaemonSet to the list of accepted values here and run make crd
.
pkg/canary/daemonset_controller.go
Outdated
} | ||
|
||
if cd.GetProgressDeadlineSeconds() > 0 { | ||
// (@mathetake): should we? |
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.
Could we enforce the deadline by calculating the time span for DaemonSetCondition.LastTransitionTime
?
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.
as far as i know, there seems no DaemonSetCondition to registered indatemonset.status.Conditions
by kubernetes master as i mentioned in the description of this PR (even though type DaemonSetCondition
is defined).
Therefore we can not use DaemonSetCondition.LastTransitionTime for deadline calculation.
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.
I see two options:
- use the canary condition
LastTransitionTime
- use the DaemonSet pods status
LastTransitionTime
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 check out 9c8b887#diff-22b8047311f2556d87d745beff11924aR53
where i used canary.Status.LastTransitionTime
for deadline calculation
and ignore daemonSetScaleDownNodeSelector in target spec change detection
and run goimports on several files
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
Thanks @mathetake awesome contribution 🥇
resolves #345
this PR adds support for daemonset target
Although there is still much of codes that can be shared among Deployments and DaemonSets (for example, test fixtures have lines of duplicated codes), i intentionally left as it is and just copied and pasted for daemonset support so that there would be less influence on existing code bases for deployment/service.
notes
ignore progressDeadlineSeconds for daemonset since currently there's noDaemonSetCondition
types in k8s to check the progress as Deployment does.anyway, thanks for maintaining this awesome project 👍