Merge pull request #176079 from aaronjheng/traefik
traefik: 2.6.3 -> 2.7.1
This commit is contained in:
commit
9d6c025ad9
2 changed files with 29 additions and 22 deletions
|
@ -11,14 +11,20 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
||||||
environment.systemPackages = [ pkgs.curl ];
|
environment.systemPackages = [ pkgs.curl ];
|
||||||
};
|
};
|
||||||
traefik = { config, pkgs, ... }: {
|
traefik = { config, pkgs, ... }: {
|
||||||
virtualisation.oci-containers.containers.nginx = {
|
virtualisation.oci-containers = {
|
||||||
extraOptions = [
|
backend = "docker";
|
||||||
"-l" "traefik.enable=true"
|
containers.nginx = {
|
||||||
"-l" "traefik.http.routers.nginx.entrypoints=web"
|
extraOptions = [
|
||||||
"-l" "traefik.http.routers.nginx.rule=Host(`nginx.traefik.test`)"
|
"-l"
|
||||||
];
|
"traefik.enable=true"
|
||||||
image = "nginx-container";
|
"-l"
|
||||||
imageFile = pkgs.dockerTools.examples.nginx;
|
"traefik.http.routers.nginx.entrypoints=web"
|
||||||
|
"-l"
|
||||||
|
"traefik.http.routers.nginx.rule=Host(`nginx.traefik.test`)"
|
||||||
|
];
|
||||||
|
image = "nginx-container";
|
||||||
|
imageFile = pkgs.dockerTools.examples.nginx;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
|
|
@ -1,33 +1,34 @@
|
||||||
{ lib, fetchzip, buildGoModule, go-bindata, nixosTests }:
|
{ lib, fetchFromGitHub, buildGoModule, nixosTests }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "traefik";
|
pname = "traefik";
|
||||||
version = "2.6.3";
|
version = "2.7.1";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/traefik/traefik/releases/download/v${version}/traefik-v${version}.src.tar.gz";
|
owner = "traefik";
|
||||||
sha256 = "sha256-OaKgX3qwiJM/EPprV1r3CbUnxOaWl7BTMcS5v+tmHoo=";
|
repo = "traefik";
|
||||||
stripRoot = false;
|
rev = "v${version}";
|
||||||
|
sha256 = "sha256-uTE0Z7lgxKNq1wQSMUSp9dMfxV+aIm7cwYSkZBUdnug=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = "sha256-tqrfCpZ/fRYZBZ/SBAvvJebLBeD2M/AVJEPiseehJHY=";
|
vendorSha256 = "sha256-WlLntYrXs1kOu26yNeZI1xpb6FsHPiA/bNzaxCZTG4Y=";
|
||||||
|
|
||||||
subPackages = [ "cmd/traefik" ];
|
subPackages = [ "cmd/traefik" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ go-bindata ];
|
|
||||||
|
|
||||||
passthru.tests = { inherit (nixosTests) traefik; };
|
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
go generate
|
go generate
|
||||||
|
|
||||||
CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary)
|
CODENAME=$(awk -F "=" '/CODENAME=/ { print $2}' script/binary)
|
||||||
|
|
||||||
buildFlagsArray+=("-ldflags=\
|
buildFlagsArray+=("-ldflags= -s -w \
|
||||||
-X github.com/traefik/traefik/v2/pkg/version.Version=${version} \
|
-X github.com/traefik/traefik/v${lib.versions.major version}/pkg/version.Version=${version} \
|
||||||
-X github.com/traefik/traefik/v2/pkg/version.Codename=$CODENAME")
|
-X github.com/traefik/traefik/v${lib.versions.major version}/pkg/version.Codename=$CODENAME")
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
passthru.tests = { inherit (nixosTests) traefik; };
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://traefik.io";
|
homepage = "https://traefik.io";
|
||||||
description = "A modern reverse proxy";
|
description = "A modern reverse proxy";
|
||||||
|
|
Loading…
Reference in a new issue