-
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
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 |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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. |
||
for customAnnotationKey, customAnnotationValue := range c.OpConfig.CustomServiceAnnotations { | ||
annotations[customAnnotationKey] = customAnnotationValue | ||
} | ||
} | ||
} else if role == Replica { | ||
// before PR #258, the replica service was only created if allocated a LB | ||
// now we always create the service but warn if the LB is absent | ||
|
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.