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
ScheduledJob kubectl #25816
ScheduledJob kubectl #25816
Conversation
@lavalamp I'm having some problems with initiating storage for scheduledjobs, iow. the
From my debugging it looks like the storagefactory is picking the wrong codec for ScheduledJob, do you have some thoughts where should I register one to be properly picked up? |
I have a long queue right now so sorry for the cryptic answer-- you need to somehow override the storage version for just the ScheduledJob resource to be v2alpha1 since it doesn't exist in v1. Not sure if the existing flag is going to make that easy or not. |
@lavalamp thanks, will try to poke around and see what I can come up with. |
dc3da4f
to
ecdc7a0
Compare
@lavalamp I've noticed there's a SetResourceEncoding which is not used currently but does exactly what you've mentioned. Iow. it allows specifying a storage version for specific resource, it's not exposed, though. Mind having a look and letting me know if it's more or less what you'd expect to look like? |
ecdc7a0
to
a7235c4
Compare
@erictune @lavalamp with the current state I am able to get & create scheduledjobs using curl, but trying to use kubectl fails everytime with |
@soltysh What's the file you're creating look like? it needs to have batch/v2alpha1 as the apiVersion? Also presumably you built an new kubectl? |
a7235c4
to
ad4536b
Compare
@lavalamp this is the resource I'm trying to create: https://gist.github.com/soltysh/a917d4aac4cbccbff690117c0fc99a6c, but I still hit error: |
just a heads up that #29187 is in now |
Yup, seen it. I'm currently updating this one. Should be ready in a few minutes. |
059a810
to
04b5931
Compare
Rebased and addressed all your comments @janetkuo . The only problem I'm struggling with is |
Code looks good, but the |
Of course it does... 😭 I'll try to figure it out later today. |
This is a problem with integration tests that I need to fix to address multiversion tests. |
04b5931
to
6b5c3e0
Compare
@janetkuo the problem was that I've added |
There's still one problem, already filled in issue #29998, but I think we'll have to deal with it as a followup. I'd like to move forward with the existing SJ PRs. |
It looks like the rbac is not working as expected against multiversioned batch, I've created #30079 to track this one and I'm removing the last commit (adding |
6b5c3e0
to
b5c68a9
Compare
GCE e2e build/test passed for commit b5c68a9. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit b5c68a9. |
Automatic merge from submit-queue |
Automatic merge from submit-queue Scheduledjob controller Supersedes #25952; first 7 commits come from #25816 <!-- Checklist for submitting a Pull Request Please remove this comment block before submitting. 1. Please read our [contributor guidelines](https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md). 2. See our [developer guide](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md). 3. If you want this PR to automatically close an issue when it is merged, add `fixes #<issue number>` or `fixes #<issue number>, fixes #<issue number>` to close multiple issues (see: https://github.com/blog/1506-closing-issues-via-pull-requests). 4. Follow the instructions for [labeling and writing a release note for this PR](https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes) in the block below. --> ```release-note ```
@erictune the last part (kubectl) of the ScheduledJob, as usual builds on top of previous PRs, so only last 2 commits matter (the kubectl one and storage leftovers).