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

Fetch cronjobs from 'batch/v1beta1' #3044

Merged
merged 2 commits into from
Jan 30, 2018
Merged

Fetch cronjobs from 'batch/v1beta1' #3044

merged 2 commits into from
Jan 30, 2018

Conversation

rbruggem
Copy link
Contributor

This applies if kubernetes' version is >= 1.8.
Otherwise fetch cronjobs from 'batch/v2alpha1'.

Also, upgrade k8s.io/client-go to kubernetes-1.9.1.

Tested with kubernetes 1.7 and 1.9.

Fixes #3032.

Upgraded from 99c19923, branch release-3.0.

This required fetching or upgrading the following:
* k8s.io/api to kubernetes-1.9.1
* k8s.io/apimachinery to kubernetes-1.9.1
* github.com/juju/ratelimit to 1.0.1
* github.com/spf13/pflag to 4c012f6d

Also, update Scope's imports/function calls to be compatible with the new client.
Copy link
Member

@rade rade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some niggles. rest lgtm

@@ -175,6 +180,20 @@ func (c *client) setupStore(kclient rest.Interface, resource string, itemType in
return store
}

func (c *client) setupCronjobsStore() (cache.Store, error) {

This comment was marked as abuse.

@@ -74,3 +86,29 @@ func (cj *cronJob) GetNode() report.Node {
}
return cj.MetaNode(report.MakeCronJobNodeID(cj.UID())).WithLatests(latest)
}

func upgrade(legacy *batchv2alpha1.CronJob) *batchv1beta1.CronJob {

This comment was marked as abuse.

This applies if kubernetes' version is >= 1.8.
Otherwise fetch cronjobs from 'batch/v2alpha1'.
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.

2 participants