Skip to content

Commit

Permalink
Rebase over main
Browse files Browse the repository at this point in the history
  • Loading branch information
rikatz committed Aug 25, 2024
1 parent f793b46 commit 2614b48
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 54 deletions.
4 changes: 1 addition & 3 deletions rootfs/etc/nginx/lua/nginx/ngx_conf_log_block.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
local balancer = require("balancer")
local monitor = require("monitor")
local plugins = require("plugins")

local luaconfig = ngx.shared.luaconfig
local enablemetrics = luaconfig:get("enablemetrics")
Expand All @@ -10,5 +9,4 @@ balancer.log()

if enablemetrics then
monitor.call()
end
plugins.run()
end
2 changes: 0 additions & 2 deletions rootfs/etc/nginx/lua/nginx/ngx_conf_srv_body_filter.lua

This file was deleted.

4 changes: 1 addition & 3 deletions rootfs/etc/nginx/lua/nginx/ngx_conf_srv_hdr_filter.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
local lua_ingress = require("lua_ingress")
local plugins = require("plugins")
lua_ingress.header()
plugins.run()
lua_ingress.header()
11 changes: 0 additions & 11 deletions rootfs/etc/nginx/lua/ngx_conf_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,6 @@ local function initialize_ingress(statusport, enablemetrics, ocsp, ingress)
certificate = res
certificate.is_ocsp_stapling_enabled = ocsp
end

ok, res = pcall(require, "plugins")
if not ok then
error("require failed: " .. tostring(res))
else
plugins = res
end

-- TODO: Re-enable 3rd party plugins
--plugins.init({ {{ range $idx, $plugin := $cfg.Plugins }}{{ if $idx }},{{ end }}{{ $plugin | quote }}{{ end }} })
plugins.init({})
end

return { initialize_ingress = initialize_ingress }
2 changes: 0 additions & 2 deletions rootfs/etc/nginx/lua/ngx_conf_init_worker.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
local function initialize_worker(enablemetrics, monitorbatchsize)
local lua_ingress = require("lua_ingress")
local balancer = require("balancer")
local plugins = require("plugins")
local monitor = require("monitor")
lua_ingress.init_worker()
balancer.init_worker()
if enablemetrics then
monitor.init_worker(monitorbatchsize)
end
plugins.run()
end

return { initialize_worker = initialize_worker }
33 changes: 0 additions & 33 deletions rootfs/etc/nginx/template/nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1141,40 +1141,7 @@ stream {

header_filter_by_lua_file /etc/nginx/lua/nginx/ngx_conf_srv_hdr_filter.lua;

<<<<<<< HEAD
header_filter_by_lua_block {
lua_ingress.header()
}

log_by_lua_block {
balancer.log()
{{ if $all.EnableMetrics }}
monitor.call()
{{ end }}
}
||||||| parent of b65dae6b8 (Remove inline lua script from template)
header_filter_by_lua_block {
lua_ingress.header()
plugins.run()
}

body_filter_by_lua_block {
plugins.run()
}

log_by_lua_block {
balancer.log()
{{ if $all.EnableMetrics }}
monitor.call()
{{ end }}

plugins.run()
}
=======
body_filter_by_lua_file /etc/nginx/lua/nginx/ngx_conf_srv_body_filter.lua;

log_by_lua_file /etc/nginx/lua/nginx/ngx_conf_log_block.lua;
>>>>>>> b65dae6b8 (Remove inline lua script from template)

{{ if not $location.Logs.Access }}
access_log off;
Expand Down

0 comments on commit 2614b48

Please sign in to comment.