-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2917 from wireapp/release_2022-12-09_09_57
Release 2022-12-09 - (expected chart version 4.29.0)
- Loading branch information
Showing
16 changed files
with
299 additions
and
393 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ stdenv | ||
, dockerTools | ||
, gnugrep | ||
, coreutils | ||
, which | ||
, dumb-init | ||
, bashInteractive | ||
, lib | ||
, makeWrapper | ||
, writers | ||
, dig | ||
, gawk | ||
, diffutils | ||
}: | ||
let | ||
nginz-disco = stdenv.mkDerivation { | ||
name = "nginz-disco"; | ||
src = (writers.writeBash "nginz_disco.sh" ../tools/nginz_disco/nginz_disco.sh); | ||
phases = "installPhase"; | ||
nativeBuildInputs = [ makeWrapper ]; | ||
installPhase = '' | ||
mkdir -p $out/bin | ||
cp $src $out/bin/nginz_disco.sh | ||
wrapProgram $out/bin/nginz_disco.sh \ | ||
--prefix PATH : "${lib.makeBinPath [ gnugrep gawk dig diffutils ]}" | ||
''; | ||
}; | ||
|
||
nginz-disco-image = dockerTools.streamLayeredImage { | ||
name = "quay.io/wire/nginz_disco"; | ||
maxLayers = 10; | ||
contents = [ | ||
bashInteractive | ||
coreutils | ||
which | ||
]; | ||
config = { | ||
Entrypoint = [ "${dumb-init}/bin/dumb-init" "--" "${nginz-disco}/bin/nginz_disco.sh" ]; | ||
}; | ||
}; | ||
in | ||
nginz-disco-image |
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,80 @@ | ||
{ stdenv | ||
, symlinkJoin | ||
, dockerTools | ||
, writeTextDir | ||
, runCommand | ||
, gnugrep | ||
, coreutils | ||
, which | ||
, inotify-tools | ||
, dumb-init | ||
, cacert | ||
, bashInteractive | ||
, lib | ||
, makeWrapper | ||
, writers | ||
, nginz | ||
}: | ||
let | ||
|
||
nginzWithReloader = stdenv.mkDerivation { | ||
name = "reload-script"; | ||
src = (writers.writeBash "nginz_reload.sh" ../services/nginz/nginz_reload.sh); | ||
phases = "installPhase"; | ||
nativeBuildInputs = [ makeWrapper ]; | ||
installPhase = '' | ||
mkdir -p $out/bin | ||
cp $src $out/bin/nginz_reload.sh | ||
wrapProgram $out/bin/nginz_reload.sh \ | ||
--prefix PATH : "${lib.makeBinPath [ inotify-tools nginz ]}" | ||
''; | ||
}; | ||
|
||
# copied from nixpkgs fakeNss, but using nginx as username | ||
nginxFakeNss = symlinkJoin { | ||
name = "fake-nss"; | ||
paths = [ | ||
(writeTextDir "etc/passwd" '' | ||
root:x:0:0:root user:/var/empty:/bin/sh | ||
nginx:x:101:101:nginx:/var/empty:/bin/sh | ||
nobody:x:65534:65534:nobody:/var/empty:/bin/sh | ||
'') | ||
(writeTextDir "etc/group" '' | ||
root:x:0: | ||
nginx:x:101: | ||
nobody:x:65534: | ||
'') | ||
(writeTextDir "etc/nsswitch.conf" '' | ||
hosts: files dns | ||
'') | ||
(runCommand "var-empty" { } '' | ||
mkdir -p $out/var/empty | ||
'') | ||
# it seems nginx still tries to log, and doesn't create | ||
# these directories automatically | ||
(runCommand "nginx-misc" { } '' | ||
mkdir -p $out/var/log/nginx | ||
mkdir -p $out/var/cache/nginx | ||
'') | ||
]; | ||
}; | ||
|
||
nginzImage = dockerTools.streamLayeredImage { | ||
name = "quay.io/wire/nginz"; | ||
maxLayers = 10; | ||
contents = [ | ||
cacert | ||
bashInteractive | ||
gnugrep | ||
which | ||
coreutils | ||
nginxFakeNss | ||
nginz # so preStop lifecycle hook in cannon can nginx -c … quit | ||
]; | ||
config = { | ||
Entrypoint = [ "${dumb-init}/bin/dumb-init" "--" "${nginzWithReloader}/bin/nginz_reload.sh" "-g" "daemon off;" "-c" "/etc/wire/nginz/conf/nginx.conf" ]; | ||
Env = [ "SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt" ]; | ||
}; | ||
}; | ||
in | ||
nginzImage |
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.