vendor files

This commit is contained in:
Serguei Bezverkhi
2018-01-09 13:57:14 -05:00
parent 558bc6c02a
commit 7b24313bd6
16547 changed files with 4527373 additions and 0 deletions

View File

@ -0,0 +1,2 @@
porter
.tag

32
vendor/k8s.io/kubernetes/test/images/porter/BUILD generated vendored Normal file
View File

@ -0,0 +1,32 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_binary",
"go_library",
)
go_binary(
name = "porter",
importpath = "k8s.io/kubernetes/test/images/porter",
library = ":go_default_library",
)
go_library(
name = "go_default_library",
srcs = ["porter.go"],
importpath = "k8s.io/kubernetes/test/images/porter",
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

19
vendor/k8s.io/kubernetes/test/images/porter/Dockerfile generated vendored Normal file
View File

@ -0,0 +1,19 @@
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM scratch
ADD localhost.crt localhost.crt
ADD localhost.key localhost.key
ADD porter porter
ENTRYPOINT ["/porter"]

25
vendor/k8s.io/kubernetes/test/images/porter/Makefile generated vendored Normal file
View File

@ -0,0 +1,25 @@
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
SRCS=porter
ARCH ?= amd64
TARGET ?= $(CURDIR)
GOLANG_VERSION ?= latest
SRC_DIR = $(notdir $(shell pwd))
export
bin:
../image-util.sh bin $(SRCS)
.PHONY: bin

12
vendor/k8s.io/kubernetes/test/images/porter/README.md generated vendored Normal file
View File

@ -0,0 +1,12 @@
This directory contains go source, Dockerfile and Makefile for making a test
container which serves requested data on ports specified in ENV variables.
The included localhost.crt is a PEM-encoded TLS cert with SAN IPs
"127.0.0.1" and "[::1]", expiring in January 2084, generated from
src/crypto/tls:
go run generate_cert.go --rsa-bits 2048 --host 127.0.0.1,::1,example.com --ca --start-date "Jan 1 00:00:00 1970" --duration=1000000h
To use a different cert/key, mount them into the pod and set the
CERT_FILE and KEY_FILE environment variables to the desired paths.
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/test/images/porter/README.md?pixel)]()

1
vendor/k8s.io/kubernetes/test/images/porter/VERSION generated vendored Normal file
View File

@ -0,0 +1 @@
1.0

View File

@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDGTCCAgGgAwIBAgIRAOAAu25xDsyahNZBSXsUWhswDQYJKoZIhvcNAQELBQAw
EjEQMA4GA1UEChMHQWNtZSBDbzAgFw03MDAxMDEwMDAwMDBaGA8yMDg0MDEyOTE2
MDAwMFowEjEQMA4GA1UEChMHQWNtZSBDbzCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAJ3bom8WHGFTGbEse2k6bhAQxjnxJvl03+DngrnrbTUXu6zw1k/b
nk11ZHfIZPpnGoySEWYLqHBiRiMvGwRgGAu3Grtf3mfeInjs1aeXFepaXc7KRm4b
z/fw3ABwvJQ9rJw9+Xb8zZqBUpoLZzjjUDTk22pNAS9XMjRSOUtLzPEYH5fL61Ev
J7FD7twinaUbZAUQvg1nsLELt87t+bo964p6p+z77g6TBa6PPezVndzmR3F0VPHV
RLPOd9gqwboFchho3z68ZNb4rnKg1fybua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FtfXzLkj67g7ydxUIN55cgDoPFLpCVRX87HU
nbVwcbxVjeBqQ1CyN329adNI1LsnPqy59LzBxDM/JWa47A6Y7Vc=
-----END RSA PRIVATE KEY-----

59
vendor/k8s.io/kubernetes/test/images/porter/pod.json generated vendored Normal file
View File

@ -0,0 +1,59 @@
{
"kind": "Pod",
"apiVersion": "v1",
"metadata": {
"name": "porter"
},
"spec": {
"containers": [
{
"name": "porter",
"image": "gcr.io/kubernetes-e2e-test-images/porter-amd64:1.0",
"env": [
{
"name": "SERVE_PORT_80",
"value": "foo"
},
{
"name": "SERVE_PORT_81",
"value": "<html><head></head><body><a href=\"/rewriteme\">rewritten link</a></body></html>"
},
{
"name": "SERVE_TLS_PORT_443",
"value": "tls foo"
},
{
"name": "SERVE_TLS_PORT_444",
"value": "<html><head></head><body><a href=\"/tls-rewriteme\">tls rewritten link</a></body></html>"
},
{
"name": "CERT_FILE",
"value": "/localhost.crt"
},
{
"name": "KEY_FILE",
"value": "/localhost.key"
}
],
"ports": [
{
"name": "p80",
"containerPort": 80
},
{
"name": "p81",
"containerPort": 81
},
{
"name": "p443",
"containerPort": 443
},
{
"name": "p444",
"containerPort": 444
}
]
}
]
}
}

82
vendor/k8s.io/kubernetes/test/images/porter/porter.go generated vendored Normal file
View File

@ -0,0 +1,82 @@
/*
Copyright 2015 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// A tiny binary for testing ports.
//
// Reads env vars; for every var of the form SERVE_PORT_X, where X is a valid
// port number, porter starts an HTTP server which serves the env var's value
// in response to any query.
package main
import (
"fmt"
"log"
"net/http"
"os"
"strings"
)
const prefix = "SERVE_PORT_"
const tlsPrefix = "SERVE_TLS_PORT_"
func main() {
for _, vk := range os.Environ() {
// Put everything before the first = sign in parts[0], and
// everything else in parts[1] (even if there are multiple =
// characters).
parts := strings.SplitN(vk, "=", 2)
key := parts[0]
value := parts[1]
if strings.HasPrefix(key, prefix) {
port := strings.TrimPrefix(key, prefix)
go servePort(port, value)
}
if strings.HasPrefix(key, tlsPrefix) {
port := strings.TrimPrefix(key, tlsPrefix)
go serveTLSPort(port, value)
}
}
select {}
}
func servePort(port, value string) {
s := &http.Server{
Addr: "0.0.0.0:" + port,
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, value)
}),
}
log.Printf("server on port %q failed: %v", port, s.ListenAndServe())
}
func serveTLSPort(port, value string) {
s := &http.Server{
Addr: "0.0.0.0:" + port,
Handler: http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, value)
}),
}
certFile := os.Getenv("CERT_FILE")
if len(certFile) == 0 {
certFile = "localhost.crt"
}
keyFile := os.Getenv("KEY_FILE")
if len(keyFile) == 0 {
keyFile = "localhost.key"
}
log.Printf("tls server on port %q with certFile=%q, keyFile=%q failed: %v", port, certFile, keyFile, s.ListenAndServeTLS(certFile, keyFile))
}