Skip to content
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

Merged
merged 7 commits into from
Feb 26, 2020
Merged

feat: Support daemonset target kind #455

merged 7 commits into from
Feb 26, 2020

Conversation

mathetake
Copy link
Collaborator

@mathetake mathetake commented Feb 23, 2020

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

anyway, thanks for maintaining this awesome project 👍

Copy link
Member

@stefanprodan stefanprodan left a 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 Show resolved Hide resolved
}

if cd.GetProgressDeadlineSeconds() > 0 {
// (@mathetake): should we?
Copy link
Member

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?

Copy link
Collaborator Author

@mathetake mathetake Feb 25, 2020

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.

Copy link
Member

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

Copy link
Collaborator Author

@mathetake mathetake Feb 26, 2020

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

test/e2e-kubernetes-tests-daemonset.sh Outdated Show resolved Hide resolved
pkg/canary/daemonset_controller.go Show resolved Hide resolved
Copy link
Member

@stefanprodan stefanprodan left a 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 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support DaemonSet primary creation
2 participants