JensErat
Repos
81
Followers
36

Events

issue comment
Support percentage values in size-based retention

One thing to consider is that there are special cases returning inconsistent values for used and available storage space, especially some network filesystems. I specifically remember NFS filers with snapshots enabled magically reducing available storage space and transparent compression enabling to store more data than the volume theoretically has.

I'd propose to just ignore and potentially document this issue, or maybe add some safeguards when reading free disk space.

Created at 3 weeks ago

update README, add Docker information

Created at 1 month ago
create branch
JensErat create branch main
Created at 1 month ago
create repository
JensErat create repository
Created at 1 month ago
issue comment
Update the build a custom image doc

Thank you for taking my changes forward!

Created at 1 month ago
pull request opened
Prevent race condition

It seems a somewhat sequence of adding/modifying/deleting temporary files sometimes triggers a race condition, sometimes resulting a panic accessing wi.StatInfo. Adding a nil check resolved the issue.

Created at 1 month ago
create branch
JensErat create branch wi-statinfo-nil-check
Created at 1 month ago
Created at 1 month ago
pull request opened
cleanup alpine Dockerfile

Description

This provides two minor cleanups to the Alpine Dockerfile:

  • remove unused $arch, $ARCH, $KONG_SHA256 environment variables (probably those have been used earlier to download+verify the kong archive using curl?)
  • merge apk add lines (bash already installed anyway below)

Testing instructions

Netlify link:

Checklist

  • [ ] Review label added
  • [ ] PR pointed to correct branch (main for immediate publishing, or a release branch: e.g. release/gateway-3.2, release/deck-1.17)

Jens Erat jens.erat@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, imprint

Created at 1 month ago
JensErat create branch cleanup-alpine-dockerfile
Created at 1 month ago
Created at 1 month ago
pull request opened
fix typo in env-file argument

Proposed changes

This is a rather obvious typo.

$ docker compose --help | grep env-file
      --env-file string            Specify an alternate environment file.

Related issues (optional)

none

Created at 1 month ago
create branch
JensErat create branch env-file-typo
Created at 1 month ago
Created at 1 month ago
issue comment
Support default values in placeholders

The default will allow pretty much anything, including escaped backslashes. I'm pretty sure this is nothing an arbitrary complex/fancy regular expression will be able to support: we'll have to catch anything in braces and analyse it. I guess we can well support it; after all a placeholder with default will have a value at any time.

I'll look into that tomorrow.

Created at 1 month ago
issue comment
Support default values in placeholders

I was pretty busy, I'm sorry for the late reply.

@francislavoie I have a somewhat hard time understanding how this code is used. It seems there is some relation to the cel matcher; but when I add a test case (which fails) and start debugging I don't yet see this code executed. So it seems we found like two more issues:

  • cel matcher needs to get defaulting-aware; I don't know this library yet, any thoughts here?
  • do we already have any unit tests for the vars.go#169 code you described above that could be extended for the placeholder defaults?
Created at 1 month ago

cel matcher placeholder defaulting test case

Created at 1 month ago

Update README.md

Update logo and fix test result badge

Update README.md

Attempt to fix logo that was appearing black in some browsers (perhaps due to CSP?).

Thanks to @IndeedNotJames for investigating! Hopefully this works.

fileserver: Add a couple test cases

With placeholders

caddytls: Add dns_ttl config, improve Caddyfile tls options (#5287)

reverseproxy: Set origreq in active health check (#5284)

  • reverseproxy: Set origreq in active health check

Fix #5281

  • Oops; dereference Request

reverseproxy: Don't enable auto-https when --from flag is http (#5269)

reverseproxy: Fix hanging for Transfer-Encoding: chunked (#5289)

  • Fixes #5236
  • enable request body buffering in reverse proxy when the request header has Transfer-Encoding: chunked

caddytls: Add test cases for Caddyfile tls options (#5293)

caddyhttp: Add server-level trusted_proxies config (#5103)

chore: Fix caddyfile.replaceEnvVars return (#5311)

go.mod: Update golang.org/x/net to v0.5.0 (#5314)

httpcaddyfile: Fix handle grouping inside route (#5315)

Co-authored-by: Francis Lavoie lavofr@gmail.com

chore: Fix typo, coral -> cobra (#5325)

httpcaddyfile: Warn on importing empty file; skip dotfiles (#5320)

  • httpcaddyfile: Change the parse rules when empty file or dotfile with a glob.

  • Fixes #5295

  • Empty file should just log a warning, and result in no tokens.

  • The last segment of the path is '*', it should skip any dotfiles.

  • The last segment of the path is '.*', it should read all dotfiles in a dir.

  • httpcaddyfile: Regard empty files as import files which include only white space.

cmd: caddy fmt return code is 1 if not formatted (#5297)

  • cmd: Fix caddy fmt if input isn't formatted

  • Fixes #5294

  • return exit 1 with an error message

  • cmd: Use formattingDifference for caddy fmt

  • #5294

  • expose caddyfile.formattingDifference

go.mod: bump tscert package to fix Tailscale 1.34+ on Windows (#5331)

As of Tailscale 1.34.0 on Windows, Tailscale now uses a named pipe to connect to the local tailscale service.

This pulls in tailscale/tscert#5 as reported in tailscale/tscert#4.

(Sorry, we should've noticed this earlier!)

Signed-off-by: Brad Fitzpatrick bradfitz@tailscale.com

Signed-off-by: Brad Fitzpatrick bradfitz@tailscale.com

tracing: Support placeholders in span name (#5329)

Fixes https://github.com/caddyserver/caddy/issues/5171

reverseproxy: Add flag to short command to disable redirects (#5330)

Co-authored-by: Francis Lavoie lavofr@gmail.com Fixes undefined

caddyfile: Allow overriding server names (#5323)

httpcaddyfile: Add persist_config global option (#5339)

Co-authored-by: Francis Lavoie lavofr@gmail.com

Created at 1 month ago

use kong configuration when reconfiguring DNS

Created at 2 months ago
pull request opened
use kong configuration when reconfiguring DNS
Created at 2 months ago
create branch
JensErat create branch syncdns-clean-reconfigure
Created at 2 months ago
Created at 2 months ago
issue comment
Graceful shutdown does not allow DNS queries anymore with 3.x

Bisecting this issue, we realized this was introduced by #8912, and we seem to be able to workaround by reconfiguring the DNS client with dns_no_sync=true.

Created at 2 months ago
issue comment
Support default values in placeholders

I now:

  • resolved the linter issues
  • added the comment on why and how the optimization works
  • re-added the optimization for strings that do not contain placeholders, which definitely improved performance again. The assumption on regular expressions was pretty valid: When benchmarking an approach using regular expressions, the "return early" optimization was actually slowing down the entire code.
  • finally I changed the HTTP header, cookie, ... behavior to return false if reasonable. Please especially check the HTTP module changes with special care, these are pretty hard to test (even if there would have been tests for this, they would just resemble the same semantics). I removed one test case which doesn't feel reasonable any more.

Of course this precludes invalid placeholder-like text, such a JSON, which should not be replaced at all.

Using JSON in header values (which are processed with ReplaceKnown) is a common usecase.

Further above, we discussed just not applying defaulting to any placeholders where the key has quotes in it. This is implemented and tested here:

https://github.com/caddyserver/caddy/pull/5275/files#diff-ee2fe630c0af5186f990380915a1d4b9b2c15b24cb5bab9e13e87dafe700eb88R256-R257 https://github.com/caddyserver/caddy/pull/5275/files#diff-536dcb7bb2efdb54d66c54859f41d31aba8c0eefe173c9702c6565c4a0dce301R90-R94

Now it depends on which of the Replace...() functions is used.

If we change that to return false would that make things easier?

Just returning false would definitely not be the right thing. In most cases, it's just passing through the boolean result we get from the map lookup.

Created at 2 months ago

do not default non-existant http variables to empty strings

Created at 2 months ago

linter fixes

Created at 2 months ago

Document braces search optimization

Created at 2 months ago

add non-placeholder optimization again

Created at 2 months ago