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

body/class definitions missing #2218

Open
mStirner opened this issue Feb 10, 2025 · 4 comments
Open

body/class definitions missing #2218

mStirner opened this issue Feb 10, 2025 · 4 comments

Comments

@mStirner
Copy link

Since #2216 was merged, pulled the changes and generated the docs (#2209).
But it seems that the class/body definitions are missing.

Image

E.g. when i search for "V1Service" i get no search results, while the online version seems to be find it:

Image

Did i something wrong or is this a bug?

@mstruebing
Copy link
Member

At first sight it seems like an issue with which files gets included.
To fix this, we should have a look at our typedoc/typescript configuration, I probably missed something.
Being a bit busy right now, I may can have a look later this week.

@mStirner
Copy link
Author

mStirner commented Feb 12, 2025

What is the correct way to create a service?

            const serviceManifest = {
                metadata: {
                    name: task.uuid, // uuid v4
                },
                spec: {
                    selector: {
                        matchLabels: {
                            uuid: task.uuid // uuid v4
                        },
                    },
                    ports: [{
                            protocol: 'TCP',
                            port: 8080,      
                            targetPort: 8080,  
                        }],
                    type: 'ClusterIP',  
                },
            };

            core.createNamespacedService({
                namespace: task.uuid,
                body: serviceManifest
            }).then(resolve).catch(reject);

gives me "cannot be handled as a Service: json: cannot unmarshal object into Go struct field ServiceSpec.spec.selector of type string":

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Service in version \\"v1\\" cannot be handled as a Service: json: cannot unmarshal object into Go struct field ServiceSpec.spec.selector of type string","reason":"BadRequest","code":400}

@cjihrig
Copy link
Contributor

cjihrig commented Feb 12, 2025

cannot unmarshal object into Go struct field ServiceSpec.spec.selector of type string

The matchLabels in your request is the problem. This seems to work though:

selector: {
  uuid: task.uuid
},

@mStirner
Copy link
Author

cannot unmarshal object into Go struct field ServiceSpec.spec.selector of type string

The matchLabels in your request is the problem. This seems to work though:

selector: {
uuid: task.uuid
},

Thanks, that worked!

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

No branches or pull requests

3 participants