-
Notifications
You must be signed in to change notification settings - Fork 34
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 CRD installation #40
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,9 +88,7 @@ spec: | |
minimum: 1 | ||
type: integer | ||
protocol: | ||
allOf: | ||
- default: TCP | ||
- default: TCP | ||
default: TCP | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sou manually added this right? Does it get removed when you run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't manually add it, that's the best part! not exactly sure how the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep theres some legacy API funniness ensuring the default, see https://github.com/kubernetes/api/blob/master/networking/v1/types.go#L148 there's no explicit default in netpol either This should be alright! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's probably that port.protocol already has TCP as its magic default somehow. |
||
description: Protocol is the network protocol (TCP, | ||
UDP, or SCTP) which traffic must match. If not specified, | ||
this field defaults to TCP. | ||
|
@@ -112,9 +110,7 @@ spec: | |
minimum: 1 | ||
type: integer | ||
protocol: | ||
allOf: | ||
- default: TCP | ||
- default: TCP | ||
default: TCP | ||
description: Protocol is the network protocol (TCP, | ||
UDP, or SCTP) which traffic must match. If not specified, | ||
this field defaults to TCP. | ||
|
@@ -699,9 +695,7 @@ spec: | |
minimum: 1 | ||
type: integer | ||
protocol: | ||
allOf: | ||
- default: TCP | ||
- default: TCP | ||
default: TCP | ||
description: Protocol is the network protocol (TCP, | ||
UDP, or SCTP) which traffic must match. If not specified, | ||
this field defaults to TCP. | ||
|
@@ -723,9 +717,7 @@ spec: | |
minimum: 1 | ||
type: integer | ||
protocol: | ||
allOf: | ||
- default: TCP | ||
- default: TCP | ||
default: TCP | ||
description: Protocol is the network protocol (TCP, | ||
UDP, or SCTP) which traffic must match. If not specified, | ||
this field defaults to TCP. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# The following patch adds the api-approved annotation to the CRD. See https://github.com/kubernetes/enhancements/pull/1111 | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
api-approved.kubernetes.io: "https://github.com/kubernetes/enhancements/pull/2522" | ||
name: adminnetworkpolicies.policy.networking.k8s.io |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# The following patch adds the api-approved annotation to the CRD. See https://github.com/kubernetes/enhancements/pull/1111 | ||
apiVersion: apiextensions.k8s.io/v1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
annotations: | ||
api-approved.kubernetes.io: "https://github.com/kubernetes/enhancements/pull/2522" | ||
name: baselineadminnetworkpolicies.policy.networking.k8s.io |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's possible I might need to use https://github.com/kubernetes/apiextensions-apiserver/blob/aabbdff63fe0a4e940e7cbe3e5188c3b6e4b63bf/pkg/apiserver/schema/validation.go#L49 (
x-kubernetes-int-or-string: true
) instead ? Would be good to check with an api expert.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no I think we are good here.