-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Add Kubernetes config examples for endpoints + gRPC #666
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
Add Kubernetes config examples for endpoints + gRPC #666
Conversation
@jeffmendoza Can you review? |
"-p", "80", | ||
"-P", "9000", | ||
"-s", "SERVICE_NAME", | ||
"-v", "SERVICE_VERSION", |
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.
Now we should call it SERVICE_CONFIG_ID
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.
fyi, the public doc still says "SERVICE_VERSION": https://cloud-dot-devsite.googleplex.com/endpoints/docs/quickstart-container-engine
@jeffmendoza
how would you recommend? we need to settled down one and be consistency
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.
I know ESP is versioned, can we have a version applied to the bookstore grpc image as well?
spec: | ||
containers: | ||
- name: esp | ||
image: b.gcr.io/endpoints/endpoints-runtime:latest |
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.
It's K8s best practice to avoid the use of :latest and specify a version.
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.
that is a good question. As discussed within the team, we are planning to use :latest for samples, so we don't have to keep updating versions when we have new release, but adding a link to release page here and also comment that:
- :latest is for sample/testing only.
- For production, we recommend a stable version from the release page, i.e. b.gcr.io/endpoints/endpoints-runtime:1.0 for GA version
How do you think?
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.
I think we should follow best practices where we can, even if it means more maintenance. http://kubernetes.io/docs/user-guide/config-best-practices/ People often take samples as-is without reading docs or notices. We shouldn't provide samples for testing only, when it is simple enough to have the actual version without any caveats.
That said, for docker images it is typical to have hierarchical tags, sort of like semantic versioning. ESP should have a major version tag, such as :1
that points to the latest point release, e.g. :1.2
, and is updated with new point releases. It would be fine to have a higher-level major version tag here.
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, ESP is planning to have :1 pointing to the latest major.minor version, and :1.x for specific major.minor stable release.
How about we use major.minor, 1.0 here? since 1.1 will introduce new features and I am not sure if users wants to switch over by default.
and in this case, should we tag :1.0 for the python grpc backend docker as well, for consistency
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.
I take back what I said, :1 looks good to me, move to :2 will take a LONG time. we may upgrade from :1.0 to :1.1 in a quarter.
similarly, we can tag the backend as :1 too.
Let me know if you agree?
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.
SGTM
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.
Cool.
I added the 1.0.0 tag for the python backend in the container registry. Will update this PR in a minute.
- containerPort: 80 | ||
- containerPort: 9000 | ||
- name: bookstore | ||
image: gcr.io/endpointsv2/python-grpc-bookstore-server:latest |
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.
Same here.
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.
how about we make that version consistent with the grpc python version we used to build this docker image? :1.0.1
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.
sounds good.
* Use fixed docker image versions instead of :latest
@jeffmendoza I've changed this PR to use fixed version number. PTAL. |
@jonparrott can you merge this PR if you don't have extra comment? I don't have write access to this repo so can't merge it myself. |
cc @ryanmats Jon is sick today |
"-P", "9000", | ||
"-s", "SERVICE_NAME", | ||
"-v", "SERVICE_CONFIG_ID", | ||
"-a", "grpc://localhost:8000" |
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.
change to 127.0.0.1
* Remote port 80 and only expose the gRPC ports
- name: esp | ||
image: b.gcr.io/endpoints/endpoints-runtime:1 | ||
args: [ | ||
"-p", "80", |
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.
This is not needed as well.
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.
You probably want two versions of this file, one for GRPC passthrough and one for GRPC with transcoding. I'd also want another one without ESP.
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.
I'd argue that should be added in a followup PR
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.
Sure
No description provided.