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

grpc - replaced fortune-builder app with official greeter app #7360

Merged
merged 1 commit into from
Jul 22, 2021
Merged

grpc - replaced fortune-builder app with official greeter app #7360

merged 1 commit into from
Jul 22, 2021

Conversation

longwuyuan
Copy link
Contributor

What this PR does / why we need it:

In the example config for the "backend-protocol: GRPC" annotation, there is a gRPC app referenced . The app is called "fortune-builder". It is outdated and uses bazel to build. But the build does not work, as documented and its not worth fixing it. The issue Building FortuneBuilder app #7301 has details on the problem and the discussion done so far. This PR replaces the fortunebuilder app with a app called "greeter". Greeter is published from the official gRPC github repo https://github.com/grpc/grpc-go/blob/master/examples/features/reflection/server/main.go (and greeter app is also referenced in the gRPC website quickstart).
#7301
#7316

Some very useful info here https://gist.github.com/aledbf/b9eaa19b36b1127ef812bd7ff319f141

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Which issue/s this PR fixes

fixes #7301
fixes #7316
-->

How Has This Been Tested?

__$ date ; time ; grpcurl -insecure testgrpc.dev.devopsdragon.com:443 list
Sunday 04 July 2021 05:39:31 PM IST
shell  2.26s user 1.30s system 0% cpu 1:32:56.11 total
children  93.89s user 27.50s system 2% cpu 1:32:56.11 total
grpc.examples.echo.Echo
grpc.reflection.v1alpha.ServerReflection
helloworld.Greeter
__$ date ; time ; grpcurl -insecure testgrpc.dev.devopsdragon.com:443 helloworld.Greeter/SayHello
Sunday 04 July 2021 05:40:48 PM IST
shell  2.27s user 1.32s system 0% cpu 1:34:13.80 total
children  94.19s user 27.68s system 2% cpu 1:34:13.80 total
{
  "message": "Hello "
}

__$ 
__me@mypad ~ 
__$ k -n ingress-nginx logs ingcontroller0-ingress-nginx-controller-56588598ff-bbzr2| tail -1
10.244.0.1 - - [04/Jul/2021:12:09:31 +0000] "POST /grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo HTTP/2.0" 200 105 "-" "grpc-go/1.30.0" 119 0.012 [default-go-grpc-greeter-server-50051] [] 10.244.0.22:50051 164 0.012 200 0ccaa873196ec94b8d5209e1034ceed0
__me@mypad ~ 
__$ k -n ingress-nginx logs ingcontroller0-ingress-nginx-controller-56588598ff-bbzr2| tail -1
10.244.0.1 - - [04/Jul/2021:12:10:48 +0000] "POST /grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo HTTP/2.0" 200 358 "-" "grpc-go/1.30.0" 136 0.006 [default-go-grpc-greeter-server-50051] [] 10.244.0.22:50051 417 0.006 200 770a56e94a1b4fc4693ed8d85800e7e5
__me@mypad ~ 
__$ 

__$ k version 
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.2", GitCommit:"092fbfbf53427de67cac1e9fa54aaa09a28371d7", GitTreeState:"clean", BuildDate:"2021-06-16T12:59:11Z", GoVersion:"go1.16.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:12:29Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}

__$ k get all,ing -o wide               
NAME                                          READY   STATUS    RESTARTS   AGE     IP            NODE       NOMINATED NODE   READINESS GATES
pod/go-grpc-greeter-server-678c54dcc8-btpg6   1/1     Running   0          4h29m   10.244.0.22   minikube   <none>           <none>

NAME                             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)     AGE    SELECTOR
service/go-grpc-greeter-server   ClusterIP   10.102.181.13   <none>        50051/TCP   18m    app=go-grpc-greeter-server
service/kubernetes               ClusterIP   10.96.0.1       <none>        443/TCP     3d6h   <none>

NAME                                     READY   UP-TO-DATE   AVAILABLE   AGE     CONTAINERS               IMAGES                              SELECTOR
deployment.apps/go-grpc-greeter-server   1/1     1            1           4h29m   go-grpc-greeter-server   longwuyuan/go-grpc-greeter-server   app=go-grpc-greeter-server

NAME                                                DESIRED   CURRENT   READY   AGE     CONTAINERS               IMAGES                              SELECTOR
replicaset.apps/go-grpc-greeter-server-678c54dcc8   1         1         1       4h29m   go-grpc-greeter-server   longwuyuan/go-grpc-greeter-server   app=go-grpc-greeter-server,pod-template-hash=678c54dcc8

NAME                                               CLASS    HOSTS                           ADDRESS          PORTS     AGE
ingress.networking.k8s.io/go-grpc-greeter-server   <none>   testgrpc.dev.devopsdragon.com   192.168.99.101   80, 443   16m

__$ k describe deployments.apps go-grpc-greeter-server 
Name:                   go-grpc-greeter-server
Namespace:              default
CreationTimestamp:      Sun, 04 Jul 2021 13:06:31 +0530
Labels:                 app=go-grpc-greeter-server
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               app=go-grpc-greeter-server
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=go-grpc-greeter-server
  Containers:
   go-grpc-greeter-server:
    Image:        longwuyuan/go-grpc-greeter-server
    Port:         50051/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:       <none>
  Volumes:        <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   go-grpc-greeter-server-678c54dcc8 (1/1 replicas created)
Events:          <none>

__$ k describe service go-grpc-greeter-server 
Name:              go-grpc-greeter-server
Namespace:         default
Labels:            app=go-grpc-greeter-server
Annotations:       <none>
Selector:          app=go-grpc-greeter-server
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.102.181.13
IPs:               10.102.181.13
Port:              <unset>  50051/TCP
TargetPort:        50051/TCP
Endpoints:         10.244.0.22:50051
Session Affinity:  None
Events:            <none>

__$ k describe ingress go-grpc-greeter-server 
Name:             go-grpc-greeter-server
Namespace:        default
Address:          192.168.99.101
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
TLS:
  wildcard.dev.devopsdragon.com terminates testgrpc.dev.devopsdragon.com
Rules:
  Host                           Path  Backends
  ----                           ----  --------
  testgrpc.dev.devopsdragon.com  
                                 /   go-grpc-greeter-server:50051 (10.244.0.22:50051)
Annotations:                     nginx.ingress.kubernetes.io/backend-protocol: GRPC
                                 nginx.ingress.kubernetes.io/ssl-redirect: true
Events:
  Type    Reason  Age                From                      Message
  ----    ------  ----               ----                      -------
  Normal  Sync    17m (x2 over 18m)  nginx-ingress-controller  Scheduled for sync

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 16, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @longwuyuan. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 16, 2021
@strongjz
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 16, 2021
@strongjz
Copy link
Member

/assign @strongjz

@strongjz
Copy link
Member

/lgtm

Thanks for updating that!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 22, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: longwuyuan, strongjz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 22, 2021
@k8s-ci-robot k8s-ci-robot merged commit 91a4bba into kubernetes:main Jul 22, 2021
@longwuyuan longwuyuan deleted the 7301-7316 branch July 26, 2021 04:59
rchshld pushed a commit to joomcode/ingress-nginx that referenced this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docs: gRPC examples Building FortuneBuilder app
3 participants