Skip to content

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