-
Notifications
You must be signed in to change notification settings - Fork 303
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
Bake backend config into ServicePort #285
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 |
---|---|---|
|
@@ -23,6 +23,7 @@ import ( | |
"k8s.io/apimachinery/pkg/types" | ||
"k8s.io/apimachinery/pkg/util/intstr" | ||
"k8s.io/ingress-gce/pkg/annotations" | ||
backendconfigv1beta1 "k8s.io/ingress-gce/pkg/apis/backendconfig/v1beta1" | ||
) | ||
|
||
// ServicePortID contains the Service and Port fields. | ||
|
@@ -39,6 +40,7 @@ type ServicePort struct { | |
Protocol annotations.AppProtocol | ||
SvcTargetPort string | ||
NEGEnabled bool | ||
BackendConfig *backendconfigv1beta1.BackendConfig | ||
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 don't think it's necessary to make this a pointer. We never will need to modify it. 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. One idea to make this a pointer is that we can distinguish if a ServicePort has any backendConfig associated with it. 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. Okay, we can leave it for now, but we should evaluate whether we really need it. I'd like to avoid having a pointer unless we actually have to modify the object. 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. That sounds good, thanks for the quick review! |
||
} | ||
|
||
// Description returns a string describing the ServicePort. | ||
|
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.
You can do this in a separate PR, but we can also put a flag that indicates whether NEG is enabled in the ContollerContext.