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

fix(kubernetes): do not throw NPE on NetworkPolicies with ingresses with null ports (#4182) #4186

Conversation

spinnakerbot
Copy link
Contributor

Similar to #4172, the code is assuming that a NetworkPolicy that has an ingress
will return an empty list of ports, but instead it defaults to null for this[1]
and so crashes.

[1] https://github.com/kubernetes-client/java/blob/master/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRule.java#L45

Automated cherry pick of 72857c1 into 1.17

…ith null ports (#4182)

Similar to #4172, the code is assuming that a NetworkPolicy that has an ingress
will return an empty list of ports, but instead it defaults to null for this[1]
and so crashes.

[1] https://github.com/kubernetes-client/java/blob/master/kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1NetworkPolicyIngressRule.java#L45
@ttomsu ttomsu merged commit 327f178 into release-1.17.x Dec 2, 2019
@ttomsu ttomsu deleted the auto-cherry-pick-1.17-72857c181f4c6ced9cd580c931ad0cd6c1087b7f branch December 2, 2019 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants