dnsname-cni: init at 1.1.1
This commit is contained in:
parent
24507d7346
commit
5826e90206
32
pkgs/applications/networking/cluster/dnsname-cni/default.nix
Normal file
32
pkgs/applications/networking/cluster/dnsname-cni/default.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{ buildGoModule, fetchFromGitHub, lib, dnsmasq }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "cni-plugin-dnsname";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "containers";
|
||||
repo = "dnsname";
|
||||
rev = "v${version}";
|
||||
sha256 = "090kpq2ppan9ayajdk5vwbvww30nphylgajn2p3441d4jg2nvsm3";
|
||||
};
|
||||
|
||||
patches = [ ./hardcode-dnsmasq-path.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace plugins/meta/dnsname/service.go --replace '@DNSMASQ@' '${dnsmasq}/bin/dnsmasq'
|
||||
'';
|
||||
|
||||
vendorSha256 = null;
|
||||
subPackages = [ "plugins/meta/dnsname" ];
|
||||
|
||||
doCheck = false; # NOTE: requires root privileges
|
||||
|
||||
meta = with lib; {
|
||||
description = "DNS name resolution for containers";
|
||||
homepage = "https://github.com/containers/dnsname";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mikroskeem ];
|
||||
};
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
diff --git a/plugins/meta/dnsname/service.go b/plugins/meta/dnsname/service.go
|
||||
index fc05f75..f6b4caf 100644
|
||||
--- a/plugins/meta/dnsname/service.go
|
||||
+++ b/plugins/meta/dnsname/service.go
|
||||
@@ -16,10 +16,14 @@ import (
|
||||
|
||||
// newDNSMasqFile creates a new instance of a dnsNameFile
|
||||
func newDNSMasqFile(domainName, networkInterface, networkName string) (dnsNameFile, error) {
|
||||
+ /*
|
||||
dnsMasqBinary, err := exec.LookPath("dnsmasq")
|
||||
if err != nil {
|
||||
return dnsNameFile{}, errors.Errorf("the dnsmasq cni plugin requires the dnsmasq binary be in PATH")
|
||||
}
|
||||
+ */
|
||||
+ _ = errors.Errorf // XXX(mikroskeem): reduce diff
|
||||
+ dnsMasqBinary := "@DNSMASQ@"
|
||||
masqConf := dnsNameFile{
|
||||
ConfigFile: makePath(networkName, confFileName),
|
||||
Domain: domainName,
|
@ -22897,6 +22897,8 @@ in
|
||||
cni = callPackage ../applications/networking/cluster/cni {};
|
||||
cni-plugins = callPackage ../applications/networking/cluster/cni/plugins.nix {};
|
||||
|
||||
dnsname-cni = callPackage ../applications/networking/cluster/dnsname-cni {};
|
||||
|
||||
multus-cni = callPackage ../applications/networking/cluster/multus-cni {};
|
||||
|
||||
cntr = callPackage ../applications/virtualization/cntr { };
|
||||
|
Loading…
Reference in New Issue
Block a user