-
Notifications
You must be signed in to change notification settings - Fork 529
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
[Serve] HTTPS Support #3380
Open
cblmemo
wants to merge
23
commits into
master
Choose a base branch
from
serve-https-example-prototype
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+274
−43
Open
[Serve] HTTPS Support #3380
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
56f2c04
init
cblmemo 229231e
Merge remote-tracking branch 'origin/master' into serve-https-example…
cblmemo 292fc73
disable update ssl
cblmemo 5dd1c0b
Merge remote-tracking branch 'origin/master' into serve-https-example…
cblmemo d8336d4
address comment
cblmemo dcf6d36
fix
cblmemo 8c01625
fix linter
cblmemo e2b6af8
remove key & cert file; add smoke test prototype
cblmemo cca6c02
add byo ssl key
cblmemo f8686ed
format
cblmemo f0613bd
comments
cblmemo 80ccacb
smoke test passed
cblmemo 4243a73
check keyfile and certfile with schema; chedck if the file exists
cblmemo 112e06c
nit
cblmemo 385a658
add column TLS_ENCRYPTED in service table; add schema in sky serve st…
cblmemo 95e3ea9
fix smoke test
cblmemo ad6768d
fix smoke test
cblmemo bfd1741
Merge remote-tracking branch 'origin/master' into serve-https-example…
cblmemo f239e68
Merge remote-tracking branch 'origin/master' into serve-https-example…
cblmemo 4262353
apply suggestions from code review
cblmemo 846e072
use env vars in the test & example
cblmemo ba2d038
rename test file
cblmemo 30ef361
Merge remote-tracking branch 'origin/master' into serve-https-example…
cblmemo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SkyServe YAML to run an HTTPS server. | ||
# | ||
# Usage: | ||
# For testing purpose, generate a self-signed certificate and key, | ||
# or bring your own: | ||
# $ openssl req -x509 -newkey rsa:2048 -days 36500 -nodes \ | ||
# -keyout <key-path> -out <cert-path> | ||
# Then: | ||
# $ sky serve up -n https examples/serve/https/service.yaml \ | ||
# --env TLS_KEYFILE_ENV_VAR=<key-path> \ | ||
# --env TLS_CERTFILE_ENV_VAR=<cert-path> | ||
# The endpoint will be printed in the console. You could also | ||
# check the endpoint by running: | ||
# $ sky serve status --endpoint https | ||
|
||
envs: | ||
TLS_KEYFILE_ENV_VAR: | ||
TLS_CERTFILE_ENV_VAR: | ||
|
||
service: | ||
readiness_probe: / | ||
replicas: 1 | ||
tls: | ||
keyfile: $TLS_KEYFILE_ENV_VAR | ||
certfile: $TLS_CERTFILE_ENV_VAR | ||
|
||
resources: | ||
ports: 8080 | ||
cpus: 2+ | ||
|
||
run: python3 -m http.server 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For existing service, this return value will be None, and
bool(tls_encrypted)
can fail?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.
Actually,
bool(None)
will returnFalse
:But I agree that it is confusing. Changed it to 0 🫡