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

Added possibility to add custom annotations to LoadBalancer service. #461

Merged
merged 2 commits into from
Jan 25, 2019

Conversation

ermajn
Copy link
Contributor

@ermajn ermajn commented Jan 23, 2019

LoadBalancer services in bare metal configuration usually requires some annotations to overcome problem assigning external IP. This should help with that.

@coveralls
Copy link

coveralls commented Jan 23, 2019

Coverage Status

Coverage remained the same at 23.766% when pulling 27865aa on ermajn:master into 9c75588 on zalando-incubator:master.

* **custom_service_annotations**
when load balancing is enabled, LoadBalancer service is created and
this parameter takes service annotations that are applied to service.
Optional.
Copy link
Member

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 ?

Copy link
Contributor Author

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.")
Copy link
Member

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 ?

Copy link
Contributor Author

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.

@sdudoladov sdudoladov merged commit 6f6a599 into zalando:master Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants