From 84dc0316afd4b30281c255cd2a26c09d1406a9c9 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Mon, 25 Nov 2024 10:03:25 -0700 Subject: [PATCH] DO NOT MERGE: Test against containers/common#2254 Signed-off-by: George Joseph --- go.mod | 2 ++ go.sum | 4 ++-- .../github.com/containers/common/libnetwork/types/network.go | 4 +++- vendor/github.com/containers/common/pkg/config/config.go | 3 +++ vendor/modules.txt | 3 ++- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index b786a34b49..8961ff1335 100644 --- a/go.mod +++ b/go.mod @@ -230,3 +230,5 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect tags.cncf.io/container-device-interface/specs-go v0.8.0 // indirect ) + +replace github.com/containers/common => github.com/gtjoseph/common v0.0.0-20241125154636-31b6f9e9f225 diff --git a/go.sum b/go.sum index 71c6bef976..aeb508a357 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,6 @@ github.com/containernetworking/plugins v1.5.1 h1:T5ji+LPYjjgW0QM+KyrigZbLsZ8jaX+ github.com/containernetworking/plugins v1.5.1/go.mod h1:MIQfgMayGuHYs0XdNudf31cLLAC+i242hNm6KuDGqCM= github.com/containers/buildah v1.38.1-0.20241119213149-52437ef15d33 h1:Ih6KuyByK7ZGGzkS0M5rVBPLWIyeDvdL5klhsKBo8vA= github.com/containers/buildah v1.38.1-0.20241119213149-52437ef15d33/go.mod h1:RxIuKhwTpRl3ma4d4BF6QzSSeg9zNNvo/xhYJOKeDQs= -github.com/containers/common v0.61.1-0.20241125104856-ceceb404e9aa h1:XetqxHBrm3klRHIe8L1QIOr57B0HUVdihxY1wop0KXg= -github.com/containers/common v0.61.1-0.20241125104856-ceceb404e9aa/go.mod h1:3mUU2/PxkOwvL46fmaRVj0YfBDBxNPOMctIvBHWo4Ak= github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6JXHGTUje2ZYobNrkg= github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I= github.com/containers/gvisor-tap-vsock v0.8.0 h1:Z8ZEWb+Lio0d+lXexONdUWT4rm9lF91vH0g3ARnMy7o= @@ -275,6 +273,8 @@ github.com/gorilla/schema v1.4.1 h1:jUg5hUjCSDZpNGLuXQOgIWGdlgrIdYvgQ0wZtdK1M3E= github.com/gorilla/schema v1.4.1/go.mod h1:Dg5SSm5PV60mhF2NFaTV1xuYYj8tV8NOPRo4FggUMnM= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys= github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= +github.com/gtjoseph/common v0.0.0-20241125154636-31b6f9e9f225 h1:0McC2EJWEmOkrbuzNpFSfTmuJmvqtmJXmUXV4iKbrcY= +github.com/gtjoseph/common v0.0.0-20241125154636-31b6f9e9f225/go.mod h1:NGRISq2vTFPSbhNqj6MLwyes4tWSlCnqbJg7R77B8xc= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= diff --git a/vendor/github.com/containers/common/libnetwork/types/network.go b/vendor/github.com/containers/common/libnetwork/types/network.go index 2b941abd43..b949928dab 100644 --- a/vendor/github.com/containers/common/libnetwork/types/network.go +++ b/vendor/github.com/containers/common/libnetwork/types/network.go @@ -277,7 +277,7 @@ type PerNetworkOptions struct { type NetworkOptions struct { // ContainerID is the container id, used for iptables comments and ipam allocation. ContainerID string `json:"container_id"` - // ContainerName is the container name, used as dns name. + // ContainerName is the container name. ContainerName string `json:"container_name"` // PortMappings contains the port mappings for this container PortMappings []PortMapping `json:"port_mappings,omitempty"` @@ -287,6 +287,8 @@ type NetworkOptions struct { // List of custom DNS server for podman's DNS resolver. // Priority order will be kept as defined by user in the configuration. DNSServers []string `json:"dns_servers,omitempty"` + // ContainerHostname is the configured DNS hostname of the container. + ContainerHostname string `json:"container_hostname"` } // PortMapping is one or more ports that will be mapped into the container. diff --git a/vendor/github.com/containers/common/pkg/config/config.go b/vendor/github.com/containers/common/pkg/config/config.go index 2d6bf276af..ed4a37b2ed 100644 --- a/vendor/github.com/containers/common/pkg/config/config.go +++ b/vendor/github.com/containers/common/pkg/config/config.go @@ -231,6 +231,9 @@ type ContainersConfig struct { // Umask is the umask inside the container. Umask string `toml:"umask,omitempty"` + // Use the container's name as default hostname instead of ID. + UseContainerNameAsHostName bool `toml:"use_container_name_as_hostname,omitempty"` + // UTSNS indicates how to create a UTS namespace for the container UTSNS string `toml:"utsns,omitempty"` diff --git a/vendor/modules.txt b/vendor/modules.txt index 33143d0c44..3feb903c1d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -174,7 +174,7 @@ github.com/containers/buildah/pkg/sshagent github.com/containers/buildah/pkg/util github.com/containers/buildah/pkg/volumes github.com/containers/buildah/util -# github.com/containers/common v0.61.1-0.20241125104856-ceceb404e9aa +# github.com/containers/common v0.61.1-0.20241125104856-ceceb404e9aa => github.com/gtjoseph/common v0.0.0-20241125154636-31b6f9e9f225 ## explicit; go 1.22.6 github.com/containers/common/internal github.com/containers/common/internal/attributedstring @@ -1392,3 +1392,4 @@ tags.cncf.io/container-device-interface/pkg/parser # tags.cncf.io/container-device-interface/specs-go v0.8.0 ## explicit; go 1.19 tags.cncf.io/container-device-interface/specs-go +# github.com/containers/common => github.com/gtjoseph/common v0.0.0-20241125154636-31b6f9e9f225