coreos / tectonic-forum

Apache License 2.0
30 stars 9 forks source link

Enable batch/v2alpha1 #117

Open kersten opened 7 years ago

kersten commented 7 years ago

Tectonic Version

1.5.7

Environment

bare metal

Other Information

Is it easily possible to integrate batch/v2alpha1 into apiserver by passing --runtime-config=batch/v2alpha1=true to apiserver daemon set or will it be overwritten by an automatic update?

I really need the CronJob feature of kubernetes.

joshrosso commented 7 years ago

You may add that to your manifest, so in your version (1.5.7), that flag would look as follows.

- --runtime-config=rbac.authorization.k8s.io/v1alpha1,batch/v2alpha1=true

Updates will only impact the container version and not overwrite this customization.

Do note that after doing this modification, assuming the cluster is already running, you'll need to:

  1. Cycle your API server pods (kill each manually since daemonsets don't support rolling updates in 1.5.x).
  2. Restart all kube-controller-manager pods. Otherwise, cron jobs will never run.

Lastly, do note that generally only beta+ features are enabled to ensure stability across auto updates. While CronJobs may cause you no problem, a massive change to it [while in alpha] could cause issues.

Let us know if this helps.

kersten commented 7 years ago

Ok thanks, I will try that out and will give feedback.

joshrosso commented 7 years ago

@kersten, I failed to emphasize the following in my advice above.

The suggestions I made are only meant for experimentation in your cluster(s).

While it is true that today we only alter the image field, we make no guarantee that adding in an alpha feature such as this or, more importantly, altering the API server manifest won't break in future updates if we were to change the internals of updates in Tectonic.

Hopefully CronJobs will make it to beta in 1.7 and this problem will go away.

Apologies that this wasn't clear.

kersten commented 7 years ago

@joshrosso Ok understood.

Working nearly like expected. Only these two items does not work:

failedJobsHistoryLimit: 0
successfulJobsHistoryLimit: 0
jonmosco commented 7 years ago

Is this a typo? Should it be - --runtime-config=rbac.authorization.k8s.io/v2alpha1,batch/v2alpha1=true