mirror of https://github.com/k3s-io/k3s
Merge pull request #35302 from intelsdi-x/portforwarding_image_changes
Automatic merge from submit-queue test-images: server address is now configurable This commit perform changes discussed in #32128 Should be merged before #35301 cc: @pskrzynspull/6/head
commit
b5d604bcb0
|
@ -12,7 +12,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
TAG = 1.0
|
TAG = 1.1
|
||||||
PREFIX = gcr.io/google_containers
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
|
@ -48,8 +48,12 @@ func getEnvInt(name string) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
bindAddress := os.Getenv("BIND_ADDRESS")
|
||||||
|
if bindAddress == "" {
|
||||||
|
bindAddress = "localhost"
|
||||||
|
}
|
||||||
bindPort := os.Getenv("BIND_PORT")
|
bindPort := os.Getenv("BIND_PORT")
|
||||||
listener, err := net.Listen("tcp", fmt.Sprintf("localhost:%s", bindPort))
|
listener, err := net.Listen("tcp", fmt.Sprintf("%s:%s", bindAddress, bindPort))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("Error listening: %v\n", err)
|
fmt.Printf("Error listening: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|
Loading…
Reference in New Issue