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

Issue 289: Adding SegmentStoreSvcAnnotations #296

Merged
merged 4 commits into from
Nov 4, 2019

Conversation

SrishT
Copy link
Contributor

@SrishT SrishT commented Oct 31, 2019

Signed-off-by: SrishT [email protected]

Change log description

SegmentStoreSvcAnnotations added to the manifest file are not visible in the kubectl describe output for the segmentStoreSvc if the domainName field is empty.

Purpose of the change

Fixes #289

What the code does

The code populates the SegmentStoreSvcAnnotations from the manifest file if external access has been enabled.

How to verify it

Add SegmentStoreSvcAnnotations to the manifest file

pravega:
    segmentStoreSvcAnnotations:
      service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix: "abc"

Deploy PravegaCluster with external access enabled. The describe output for the segmentStoreSvc should contain the added segmentStoreSvcAnnotations key-value pairs as part of Annotations field of the output.

$ kubectl describe svc bar-pravega-pravega-segmentstore-0
Name:                     bar-pravega-pravega-segmentstore-0
Namespace:                default
Labels:                   app=pravega-cluster
                          component=pravega-segmentstore
                          pravega_cluster=bar-pravega
Annotations:              ncp/error.loadbalancer: IP_POOL_EXHAUSTED
                          service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix: abc
Selector:                 statefulset.kubernetes.io/pod-name=bar-pravega-pravega-segmentstore-0
Type:                     LoadBalancer
IP:                       10.100.200.55
Port:                     server  12345/TCP
TargetPort:               12345/TCP
NodePort:                 server  30860/TCP
Endpoints:                172.28.78.12:12345
Session Affinity:         None
External Traffic Policy:  Local
HealthCheck NodePort:     31566
Events:                   <none>

@SrishT SrishT requested a review from pbelgundi October 31, 2019 13:57
pkg/controller/pravega/pravega_segmentstore.go Outdated Show resolved Hide resolved
pkg/controller/pravega/pravega_segmentstore.go Outdated Show resolved Hide resolved
Copy link
Contributor

@pbelgundi pbelgundi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis build is failing. Could you pls fix that..
Otherwise LGTM.

@pbelgundi
Copy link
Contributor

Please also add a UT for enabling external access and setting domain name alone without setting external svc annotations.

Copy link
Contributor

@pbelgundi pbelgundi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested some improvements to unit tests.

Copy link
Contributor

@pbelgundi pbelgundi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pbelgundi pbelgundi merged commit b51c115 into master Nov 4, 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.

Add segmentStoreSvcAnnotations isn't working : - not shown in svc of SS
2 participants