-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[installer]: general fixes for the meta components
This now installs the meta components to a cluster using an InCluster database and registry
- Loading branch information
Simon Emms
committed
Oct 26, 2021
1 parent
5294aa3
commit dd26d45
Showing
12 changed files
with
107 additions
and
81 deletions.
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
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
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
43 changes: 2 additions & 41 deletions
43
installer/pkg/components/proxy/templates/configmap/vhost.open-vsx.tpl
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 |
---|---|---|
@@ -1,48 +1,9 @@ | ||
# We cache the requests to the VSX registry and in case of an upstream server error we serve the the cached results. | ||
https://open-vsx.{{.Domain}} { | ||
import enable_log_debug | ||
import remove_server_header | ||
import ssl_configuration | ||
# The http_cache plugin does not allow to cache the HTTP OPTIONS method. | ||
# That's why we simply serve a static respond instead of asking the upstream server. | ||
@options method OPTIONS | ||
header @options { | ||
Access-Control-Allow-Credentials "true" | ||
Access-Control-Allow-Headers "content-type,x-market-client-id,x-market-user-id,x-client-commit,x-client-name,x-client-version,x-machine-id" | ||
Access-Control-Allow-Methods "OPTIONS,GET,POST,PATCH,PUT,DELETE" | ||
Access-Control-Allow-Origin "*" | ||
} | ||
respond @options 204 { | ||
close | ||
} | ||
reverse_proxy { | ||
to https://{{.RepoURL}} | ||
# health_uri /api/-/search | ||
header_up Host "{{.RepoURL}}" | ||
header_up -Connection | ||
# Override/remove existing cache control headers from the upstream server. | ||
header_down Cache-Control "max-age=30, public" # cache for 30 seconds | ||
header_down -Vary | ||
header_down -Pragma | ||
header_down -Expires | ||
} | ||
gitpod.body_intercept { | ||
search "{{.RepoURL}}" | ||
replace "open-vsx.{{.Domain}}" | ||
} | ||
http_cache { | ||
cache_type file | ||
path /tmp/openvsx-cache | ||
match_path / | ||
match_methods GET HEAD POST | ||
stale_max_age 72h # 3 days | ||
cache_key "{http.request.method} {http.request.host}{http.request.uri.path}?{http.request.uri.query} {http.request.contentlength} {http.request.bodyhash}" | ||
reverse_proxy { | ||
to {{.RepoURL}} | ||
} | ||
} |
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