mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
vendor files
This commit is contained in:
26
vendor/k8s.io/kubernetes/cluster/addons/registry/images/Dockerfile
generated
vendored
Normal file
26
vendor/k8s.io/kubernetes/cluster/addons/registry/images/Dockerfile
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
# 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 nginx:1.11
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
curl \
|
||||
--no-install-recommends \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
|
||||
|
||||
COPY rootfs /
|
||||
|
||||
CMD ["/bin/boot"]
|
24
vendor/k8s.io/kubernetes/cluster/addons/registry/images/Makefile
generated
vendored
Normal file
24
vendor/k8s.io/kubernetes/cluster/addons/registry/images/Makefile
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
# 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.
|
||||
|
||||
.PHONY: build push vet test clean
|
||||
|
||||
TAG = 0.4
|
||||
REPO = gcr.io/google_containers/kube-registry-proxy
|
||||
|
||||
build:
|
||||
docker build --pull -t $(REPO):$(TAG) .
|
||||
|
||||
push:
|
||||
gcloud docker -- push $(REPO):$(TAG)
|
23
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/bin/boot
generated
vendored
Executable file
23
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/bin/boot
generated
vendored
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# fail if no hostname is provided
|
||||
REGISTRY_HOST=${REGISTRY_HOST:?no host}
|
||||
REGISTRY_PORT=${REGISTRY_PORT:-5000}
|
||||
|
||||
# we are always listening on port 80
|
||||
# https://github.com/nginxinc/docker-nginx/blob/43c112100750cbd1e9f2160324c64988e7920ac9/stable/jessie/Dockerfile#L25
|
||||
PORT=80
|
||||
|
||||
sed -e "s/%HOST%/$REGISTRY_HOST/g" \
|
||||
-e "s/%PORT%/$REGISTRY_PORT/g" \
|
||||
-e "s/%BIND_PORT%/$PORT/g" \
|
||||
</etc/nginx/conf.d/default.conf.in >/etc/nginx/conf.d/default.conf
|
||||
|
||||
# wait for registry to come online
|
||||
while ! curl -sS "$REGISTRY_HOST:$REGISTRY_PORT" &>/dev/null; do
|
||||
printf "waiting for the registry (%s:%s) to come online...\n" "$REGISTRY_HOST" "$REGISTRY_PORT"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
printf "starting proxy...\n"
|
||||
exec nginx -g "daemon off;" "$@"
|
28
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/etc/nginx/conf.d/default.conf.in
generated
vendored
Normal file
28
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/etc/nginx/conf.d/default.conf.in
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
# Docker registry proxy for api version 2
|
||||
|
||||
upstream docker-registry {
|
||||
server %HOST%:%PORT%;
|
||||
}
|
||||
|
||||
# No client auth or TLS
|
||||
# TODO(bacongobbler): experiment with authenticating the registry if it's using TLS
|
||||
server {
|
||||
listen %BIND_PORT%;
|
||||
server_name localhost;
|
||||
|
||||
# disable any limits to avoid HTTP 413 for large image uploads
|
||||
client_max_body_size 0;
|
||||
|
||||
# required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
|
||||
chunked_transfer_encoding on;
|
||||
|
||||
location / {
|
||||
# Do not allow connections from docker 1.5 and earlier
|
||||
# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
|
||||
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
|
||||
return 404;
|
||||
}
|
||||
|
||||
include docker-registry.conf;
|
||||
}
|
||||
}
|
6
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/etc/nginx/docker-registry.conf
generated
vendored
Normal file
6
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/etc/nginx/docker-registry.conf
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
proxy_pass http://docker-registry;
|
||||
proxy_set_header Host $http_host; # required for docker client's sake
|
||||
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 900;
|
26
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/etc/nginx/nginx.conf
generated
vendored
Normal file
26
vendor/k8s.io/kubernetes/cluster/addons/registry/images/rootfs/etc/nginx/nginx.conf
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
Reference in New Issue
Block a user