-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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 njs to nginx build #11248
Draft
strongjz
wants to merge
2
commits into
kubernetes:main
Choose a base branch
from
strongjz:add-njs
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
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.
Draft
add njs to nginx build #11248
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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 | ||
---|---|---|---|---|
|
@@ -109,6 +109,10 @@ export OPENTELEMETRY_CPP_VERSION="v1.11.0" | |||
# Check on https://github.com/open-telemetry/opentelemetry-proto | ||||
export OPENTELEMETRY_PROTO_VERSION="v1.1.0" | ||||
|
||||
# http://hg.nginx.org/njs | ||||
export NGINX_NJS_VERSION="0.8.3" | ||||
|
||||
|
||||
export BUILD_PATH=/tmp/build | ||||
|
||||
ARCH=$(uname -m) | ||||
|
@@ -123,7 +127,7 @@ get_src() | |||
|
||||
echo "Downloading $url" | ||||
|
||||
curl -sSL "$url" -o "$f" | ||||
curl --retry 5 -sSL "$url" -o "$f" | ||||
# TODO: Reenable checksum verification but make it smarter | ||||
# echo "$hash $f" | sha256sum -c - || exit 10 | ||||
if [ ! -z "$dest" ]; then | ||||
|
@@ -282,6 +286,10 @@ get_src 0fb790e394510e73fdba1492e576aaec0b8ee9ef08e3e821ce253a07719cf7ea \ | |||
get_src d74f86ada2329016068bc5a243268f1f555edd620b6a7d6ce89295e7d6cf18da \ | ||||
"https://github.com/microsoft/mimalloc/archive/${MIMALOC_VERSION}.tar.gz" "mimalloc" | ||||
|
||||
|
||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
get_src b7afc0e67cf1be8f9ea4b1e6133026e7fb6b8953fafc947d0778ca48a0aa1e64 \ | ||||
"http://hg.nginx.org/njs/archive/${NGINX_NJS_VERSION}.tar.gz" | ||||
|
||||
# improve compilation times | ||||
CORES=$(($(grep -c ^processor /proc/cpuinfo) - 1)) | ||||
|
||||
|
@@ -489,7 +497,8 @@ WITH_MODULES=" \ | |||
--add-dynamic-module=$BUILD_PATH/nginx-http-auth-digest \ | ||||
--add-dynamic-module=$BUILD_PATH/ModSecurity-nginx \ | ||||
--add-dynamic-module=$BUILD_PATH/ngx_http_geoip2_module \ | ||||
--add-dynamic-module=$BUILD_PATH/ngx_brotli" | ||||
--add-dynamic-module=$BUILD_PATH/ngx_brotli \ | ||||
--add-module=$BUILD_PATH/njs/nginx" | ||||
|
||||
./configure \ | ||||
--prefix=/usr/local/nginx \ | ||||
|
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 | ||||
---|---|---|---|---|---|---|
|
@@ -452,6 +452,9 @@ | |||||
// MIME Types that will be compressed on-the-fly using Brotli module | ||||||
BrotliTypes string `json:"brotli-types,omitempty"` | ||||||
|
||||||
//Enables NGINX JS | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
EnableNJS bool `json:"enable-njs,omitempty` | ||||||
|
||||||
// Enables or disables the HTTP/2 support in secure connections | ||||||
// http://nginx.org/en/docs/http/ngx_http_v2_module.html | ||||||
// Default: true | ||||||
|
@@ -790,6 +793,7 @@ | |||||
BrotliLevel: 4, | ||||||
BrotliMinLength: 20, | ||||||
BrotliTypes: brotliTypes, | ||||||
EnableNJS: false, | ||||||
ClientHeaderBufferSize: "1k", | ||||||
ClientHeaderTimeout: 60, | ||||||
ClientBodyBufferSize: "8k", | ||||||
|
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 | ||||
---|---|---|---|---|---|---|
|
@@ -228,6 +228,8 @@ | |||||
disableSyncEvents = flags.Bool("disable-sync-events", false, "Disables the creation of 'Sync' event resources") | ||||||
|
||||||
enableTopologyAwareRouting = flags.Bool("enable-topology-aware-routing", false, "Enable topology aware routing feature, needs service object annotation service.kubernetes.io/topology-mode sets to auto.") | ||||||
|
||||||
|
||||||
Comment on lines
+231
to
+232
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
|
||||||
flags.StringVar(&nginx.MaxmindMirror, "maxmind-mirror", "", `Maxmind mirror url (example: http://geoip.local/databases.`) | ||||||
|
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.