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
V1ServicePort with wrong type for targetPort #666
Comments
Officially, the targetPort is an IntOrString so we need to implement special handlingwhich currently doesn't exist. |
@brendanburns where should I start looking and see if I could help with a fix ? |
@Saeger thanks for offering to help. We haven't done this for Javascript before, so it's likely to be a little rocky, but here's what (I think) you need to do. We need to add To the Javascript client config: Then you need to regenerate the client: This code should not compile because it will be missing the As I mentioned, complicated, please feel free to ping this issue if you try and see errors! |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/lifecycle frozen |
@brendandburns thanks for pointing me to this issue, I've created a couple of pull requests which I think address the issue: |
I have just pushed an |
Describe the bug
The "targetPort" type is defined as "object" while the possibility of values can be both number and string.
With this said, you can't set a type for a variable and fill targetPort with a number the way it's implemented.
"Type 'number' is not assignable to type 'object'.ts(2322)"
** Client Version **
0.14.3
** Server Version **
1.18.0
To Reproduce
Steps to reproduce the behavior:
Define a variable of type V1Service and try to make the specs for ports.
Expected behavior
The type definition could be defined as number | string since both are supported.
** Example Code**
ports: [ { name: 'http', port: 80, targetPort: 3000, protocol: 'TCP', }, ],
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: