-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
The current CRD from mix bonny.gen.manifest
doesn't work on later version of k8s
#117
Comments
Hey @FreedomBen, did you get amywhere with this? |
@mruoss yes! My operator got re-prioritized for a couple of sprints due to unexpected important stuff, but I'm back on it as of yesterday. I've got most of the work done now, I'm just testing. Unless something unexpected happens, I think I'll have it ready for PR by the end of the week. If things went really well (which rarely happens to me in software lol) it might be ready for PR this evening (US timezone). Do you need it now? |
oh, that's great! I'm keen to see your approach. Also feel free to open a "WIP" PR to start a discussion even if it's not ready to be merged... |
Getting very close 🤞 |
I'm currently stuck with this issue using later version of k8s, the manifest generated will not work, we need to provide the open api spec right? What about using something like https://github.com/open-api-spex/open_api_spex |
@danhawkins We need to provide the CRD in its new format, including the spec yes. @FreedomBen your last post sounded so promising! What happened? |
Any updates here? I'm also stuck in my Operator :( |
Hmm... it looks like Cory had already implemented something. Can anyone test this? What happens if you add this to your config.exs: config :bonny,
api_version: "apiextensions.k8s.io/v1" Edit: See #101 |
It would be nice ot there was a way to actually define the openapi schema... |
When use this option generated file use api_version specified in configuration.
Yaml generated: apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
eigr_functions_protocol_major_version: '0'
eigr_functions_protocol_minor_version: '1'
proxy_name: spawn
k8s-app: eigr-functions-controller
name: actorsystems.spawn.eigr.io
spec:
group: spawn.eigr.io
names:
kind: ActorSystem
plural: actorsystems
shortNames:
- as
- actorsys
- actorsystem
- actorsystems
- system
singular: actorsystem
scope: Cluster
versions:
- name: v1
scheme:
openAPIV3Scheme:
additionalPrinterColumns:
- description: Storage type of the Actor System
jsonPath: .spec.storage.type
name: storage
type: string
- description: |-
CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata
jsonPath: .metadata.creationTimestamp
name: Age
type: date |
Oh boy... seems like typos in #101. What if you manually change
No... still not... |
|
These are the mistakes now:
|
Opened a pull request (#143) where I try to fix this. But we don't have integration tests here yet. Need to test that first. |
I think we created a PR to fix the same thing :D #144 |
yup. Closed yours ;) Edit: as mine also addresses some other problems. |
Ignore my previous comment. I had taken a test wrong |
@mruoss The new version works accordingly. I think there's enough material to spawn a new version of bonny now wdyt?
|
For people looking for a solution, the generated CRD should work now (since version 0.5.2), once you have added the following entry to your config :bonny,
api_version: "apiextensions.k8s.io/v1" |
The CRD v1beta1 has been removed from later versions of k8s (v1.20+). Format has changed from
v1beta1
tov1
and it is incompatible, so some non-trivial changes are required.For reference/convenience, here is the v1 spec.
I can work on this later this week. Once I get it working for my operator I'll port the changes back upstream to Bonny. Don't take that as a staking of territory! If someone else wants to take it I won't feel hurt/sad/whatever, just let me know so that we don't duplicate effort. (as always time is limited and needs to be invested wisely)
The text was updated successfully, but these errors were encountered: