mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
vendor files
This commit is contained in:
46
vendor/k8s.io/kubernetes/cluster/images/hyperkube/BUILD
generated
vendored
Normal file
46
vendor/k8s.io/kubernetes/cluster/images/hyperkube/BUILD
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
load("@io_bazel_rules_docker//docker:docker.bzl", "docker_build", "docker_bundle")
|
||||
|
||||
docker_build(
|
||||
name = "hyperkube-internal",
|
||||
base = "@debian-hyperkube-base-amd64//image",
|
||||
files = [
|
||||
"//cmd/hyperkube",
|
||||
],
|
||||
symlinks = {
|
||||
"/%s" % path: "/hyperkube"
|
||||
for path in [
|
||||
"/apiserver",
|
||||
"/controller-manager",
|
||||
"/kubectl",
|
||||
"/kubelet",
|
||||
"/proxy",
|
||||
"/scheduler",
|
||||
"/usr/local/bin/kube-apiserver",
|
||||
"/usr/local/bin/kube-controller-manager",
|
||||
"/usr/local/bin/kubectl",
|
||||
"/usr/local/bin/kubelet",
|
||||
"/usr/local/bin/kube-proxy",
|
||||
"/usr/local/bin/kube-scheduler",
|
||||
]
|
||||
},
|
||||
)
|
||||
|
||||
docker_bundle(
|
||||
name = "hyperkube",
|
||||
images = {"gcr.io/google-containers/hyperkube-amd64:{STABLE_DOCKER_TAG}": "hyperkube-internal"},
|
||||
stamp = True,
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "package-srcs",
|
||||
srcs = glob(["**"]),
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all-srcs",
|
||||
srcs = [":package-srcs"],
|
||||
tags = ["automanaged"],
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
38
vendor/k8s.io/kubernetes/cluster/images/hyperkube/Dockerfile
generated
vendored
Normal file
38
vendor/k8s.io/kubernetes/cluster/images/hyperkube/Dockerfile
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
# 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 BASEIMAGE
|
||||
|
||||
# Create symlinks for each hyperkube server
|
||||
# Also create symlinks to /usr/local/bin/ where the server image binaries live, so the hyperkube image may be
|
||||
# used instead of gcr.io/google_containers/kube-* without any modifications.
|
||||
# TODO: replace manual symlink creation with --make-symlink command once
|
||||
# cross-building with qemu supports go binaries. See #28702
|
||||
# RUN /hyperkube --make-symlinks
|
||||
RUN ln -s /hyperkube /apiserver \
|
||||
&& ln -s /hyperkube /controller-manager \
|
||||
&& ln -s /hyperkube /kubectl \
|
||||
&& ln -s /hyperkube /kubelet \
|
||||
&& ln -s /hyperkube /proxy \
|
||||
&& ln -s /hyperkube /scheduler \
|
||||
&& ln -s /hyperkube /aggerator \
|
||||
&& ln -s /hyperkube /usr/local/bin/kube-apiserver \
|
||||
&& ln -s /hyperkube /usr/local/bin/kube-controller-manager \
|
||||
&& ln -s /hyperkube /usr/local/bin/kubectl \
|
||||
&& ln -s /hyperkube /usr/local/bin/kubelet \
|
||||
&& ln -s /hyperkube /usr/local/bin/kube-proxy \
|
||||
&& ln -s /hyperkube /usr/local/bin/kube-scheduler
|
||||
|
||||
# Copy the hyperkube binary
|
||||
COPY hyperkube /hyperkube
|
54
vendor/k8s.io/kubernetes/cluster/images/hyperkube/Makefile
generated
vendored
Normal file
54
vendor/k8s.io/kubernetes/cluster/images/hyperkube/Makefile
generated
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
# 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.
|
||||
|
||||
# Build the hyperkube image.
|
||||
#
|
||||
# Usage:
|
||||
# [ARCH=amd64] [REGISTRY="gcr.io/google-containers"] make (build|push) VERSION={some_released_version_of_kubernetes}
|
||||
|
||||
REGISTRY?=gcr.io/google-containers
|
||||
ARCH?=amd64
|
||||
HYPERKUBE_BIN?=_output/dockerized/bin/linux/$(ARCH)/hyperkube
|
||||
|
||||
BASEIMAGE=gcr.io/google-containers/debian-hyperkube-base-$(ARCH):0.8
|
||||
TEMP_DIR:=$(shell mktemp -d -t hyperkubeXXXXXX)
|
||||
|
||||
all: build
|
||||
|
||||
build:
|
||||
|
||||
ifndef VERSION
|
||||
$(error VERSION is undefined)
|
||||
endif
|
||||
cp -r ./* ${TEMP_DIR}
|
||||
cp ../../../${HYPERKUBE_BIN} ${TEMP_DIR}
|
||||
|
||||
chmod a+rx ${TEMP_DIR}/hyperkube
|
||||
|
||||
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
|
||||
|
||||
# Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel
|
||||
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||
docker build --pull -t ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${TEMP_DIR}
|
||||
rm -rf "${TEMP_DIR}"
|
||||
|
||||
push: build
|
||||
gcloud docker -- push ${REGISTRY}/hyperkube-${ARCH}:${VERSION}
|
||||
ifeq ($(ARCH),amd64)
|
||||
docker rmi ${REGISTRY}/hyperkube:${VERSION} 2>/dev/null || true
|
||||
docker tag ${REGISTRY}/hyperkube-${ARCH}:${VERSION} ${REGISTRY}/hyperkube:${VERSION}
|
||||
gcloud docker -- push ${REGISTRY}/hyperkube:${VERSION}
|
||||
endif
|
||||
|
||||
.PHONY: build push all
|
35
vendor/k8s.io/kubernetes/cluster/images/hyperkube/README.md
generated
vendored
Normal file
35
vendor/k8s.io/kubernetes/cluster/images/hyperkube/README.md
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
### hyperkube
|
||||
|
||||
`hyperkube` is an all-in-one binary for the Kubernetes server components
|
||||
`hyperkube` is built for multiple architectures and _the image is pushed automatically on every release._
|
||||
|
||||
#### How to release by hand
|
||||
|
||||
```console
|
||||
# First, build the binaries
|
||||
$ build/run.sh make cross
|
||||
|
||||
# Build for linux/amd64 (default)
|
||||
# export REGISTRY=$HOST/$ORG to switch from gcr.io/google_containers
|
||||
|
||||
$ make push VERSION={target_version} ARCH=amd64
|
||||
# ---> gcr.io/google_containers/hyperkube-amd64:VERSION
|
||||
# ---> gcr.io/google_containers/hyperkube:VERSION (image with backwards-compatible naming)
|
||||
|
||||
$ make push VERSION={target_version} ARCH=arm
|
||||
# ---> gcr.io/google_containers/hyperkube-arm:VERSION
|
||||
|
||||
$ make push VERSION={target_version} ARCH=arm64
|
||||
# ---> gcr.io/google_containers/hyperkube-arm64:VERSION
|
||||
|
||||
$ make push VERSION={target_version} ARCH=ppc64le
|
||||
# ---> gcr.io/google_containers/hyperkube-ppc64le:VERSION
|
||||
|
||||
$ make push VERSION={target_version} ARCH=s390x
|
||||
# ---> gcr.io/google_containers/hyperkube-s390x:VERSION
|
||||
```
|
||||
|
||||
If you don't want to push the images, run `make` or `make build` instead
|
||||
|
||||
|
||||
[]()
|
Reference in New Issue
Block a user