-
Notifications
You must be signed in to change notification settings - Fork 981
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
Added possibility to add custom annotations to LoadBalancer service. #461
Conversation
* **custom_service_annotations** | ||
when load balancing is enabled, LoadBalancer service is created and | ||
this parameter takes service annotations that are applied to service. | ||
Optional. |
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.
is this applied to both replica and master LBs if they are enabled ?
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.
yes, that is correct, to both replica and master, but only LB type.
@@ -1093,6 +1093,13 @@ func (c *Cluster) generateService(role PostgresRole, spec *acidv1.PostgresSpec) | |||
constants.ZalandoDNSNameAnnotation: dnsName, | |||
constants.ElbTimeoutAnnotationName: constants.ElbTimeoutAnnotationValue, | |||
} | |||
|
|||
if len(c.OpConfig.CustomServiceAnnotations) != 0 { | |||
c.logger.Debugf("There are custom annotations defined, creating them.") |
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.
should not these annotations be applied only when the service of type LB is created ?
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.
yes, and considering line 1090 annotations are applied only in case of LB type.
LoadBalancer services in bare metal configuration usually requires some annotations to overcome problem assigning external IP. This should help with that.