-
Notifications
You must be signed in to change notification settings - Fork 38
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
Issue 211: Adding annotation to segment store service for external dns #240
Conversation
Service shows annotation set correctly:
|
When external_access = true, but 'domainName' is not set in manifest, external-dns annotation is not added to the service:
|
Signed-off-by: pbelgundi <[email protected]>
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.
LGTM
Signed-off-by: pbelgundi <[email protected]>
…ue-211-external-dns
0f5d7dc
to
e709573
Compare
@@ -329,18 +333,35 @@ func MakeSegmentStoreHeadlessService(pravegaCluster *api.PravegaCluster) *corev1 | |||
|
|||
func MakeSegmentStoreExternalServices(pravegaCluster *api.PravegaCluster) []*corev1.Service { | |||
var service *corev1.Service | |||
var ssPodName string | |||
var ssFQDN string | |||
var annotationMap map[string]string |
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.
In my opinion, the above variables would best be defined within the for
loop.
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.
Looks good, thanks.
Signed-off-by: pbelgundi [email protected]
Change log description
Added external-dns annotation to segment store external service that can be used by external-dns provider to assign a DNS name to the service.
Purpose of the change
Fixes #211
What the code does
Added
domainName
to Pravega Cluster Spec, that can be set via manifest to arrive at the FQDN for a single segment store node.FQDN for segment store pod = SegmentStore_Pod_Name.domainName. ( ends with a . )
Added annotation
external-dns.alpha.kubernetes.io/hostname
to external service for each segment store container.If external access=true, but domain name is not set in manifest, it would default to "pravega.io"
How to verify it
example.com. 2
kubectl svc pravega-pravega-segmentstore-0 -o yamlshould show :
external-dns.alpha.kubernetes.io/hostname: pravega-pravega-segmentstore-0.example.com.`