Add generated file
This PR adds generated files under pkg/client and vendor folder.
This commit is contained in:
4
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/BASEIMAGE
generated
vendored
Normal file
4
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/BASEIMAGE
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
amd64=k8s.gcr.io/debian-base-amd64:0.3
|
||||
arm=k8s.gcr.io/debian-base-arm:0.3
|
||||
arm64=k8s.gcr.io/debian-base-arm64:0.3
|
||||
ppc64le=k8s.gcr.io/debian-base-ppc64le:0.3
|
||||
40
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/Dockerfile
generated
vendored
Normal file
40
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/Dockerfile
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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.
|
||||
|
||||
# TODO: get rid of bash dependency and switch to plain busybox.
|
||||
# The tar in busybox also doesn't seem to understand compression.
|
||||
FROM BASEIMAGE
|
||||
|
||||
CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
|
||||
|
||||
# TODO: just use standard redis when there is one for 3.2.0.
|
||||
RUN clean-install wget make gcc libc-dev
|
||||
|
||||
# See README.md
|
||||
RUN wget -qO /redis-3.2.0.tar.gz http://download.redis.io/releases/redis-3.2.0.tar.gz && \
|
||||
tar -xzf /redis-3.2.0.tar.gz -C /tmp/ && rm /redis-3.2.0.tar.gz
|
||||
|
||||
# Clean out existing deps before installation
|
||||
# see https://github.com/antirez/redis/issues/722
|
||||
RUN cd /tmp/redis-3.2.0 && make distclean && mkdir -p /redis && \
|
||||
make install INSTALL_BIN=/redis && \
|
||||
mv /tmp/redis-3.2.0/redis.conf /redis/redis.conf && \
|
||||
rm -rf /tmp/redis-3.2.0
|
||||
|
||||
ADD on-start.sh /
|
||||
|
||||
COPY peer-finder /
|
||||
ADD install.sh /
|
||||
RUN chmod -c 755 /install.sh /on-start.sh /peer-finder
|
||||
Entrypoint ["/install.sh"]
|
||||
25
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/Makefile
generated
vendored
Normal file
25
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/Makefile
generated
vendored
Normal 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 = peer-finder
|
||||
ARCH ?= amd64
|
||||
TARGET ?= $(CURDIR)
|
||||
GOLANG_VERSION ?= latest
|
||||
SRC_DIR = pets/peer-finder
|
||||
export
|
||||
|
||||
bin:
|
||||
../../image-util.sh bin $(SRCS)
|
||||
|
||||
.PHONY: bin
|
||||
12
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/README.md
generated
vendored
Normal file
12
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/README.md
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# Redis statefulset e2e tester
|
||||
|
||||
The image in this directory is the init container for contrib/pets/redis but for one difference, it bakes a specific version of redis into the base image so we get deterministic test results without having to depend on a redis download server. Discussing the tradeoffs to either approach (download the version at runtime, or maintain an image per version) are outside the scope of this document.
|
||||
|
||||
You can execute the image locally via:
|
||||
```
|
||||
$ docker run -it k8s.gcr.io/redis-install-3.2.0:e2e --cmd --install-into=/opt --work-dir=/work-dir
|
||||
```
|
||||
To share the installation with other containers mount the appropriate volumes as `--install-into` and `--work-dir`, where `install-into` is the directory to install redis into, and `work-dir` is the directory to install the user/admin supplied on-{start,change} hook scripts.
|
||||
|
||||
|
||||
[]()
|
||||
1
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/VERSION
generated
vendored
Normal file
1
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/VERSION
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
1.1
|
||||
51
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/install.sh
generated
vendored
Executable file
51
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/install.sh
generated
vendored
Executable file
@@ -0,0 +1,51 @@
|
||||
#! /bin/bash
|
||||
|
||||
# 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.
|
||||
|
||||
# This volume is assumed to exist and is shared with parent of the init
|
||||
# container. It contains the redis installation.
|
||||
INSTALL_VOLUME="/opt"
|
||||
|
||||
# This volume is assumed to exist and is shared with the peer-finder
|
||||
# init container. It contains on-start/change configuration scripts.
|
||||
WORK_DIR="/work-dir"
|
||||
|
||||
VERSION="3.2.0"
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
case $i in
|
||||
-i=*|--install-into=*)
|
||||
INSTALL_VOLUME="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
-w=*|--work-dir=*)
|
||||
WORK_DIR="${i#*=}"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
# unknown option
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo installing config scripts into "${WORK_DIR}"
|
||||
mkdir -p "${WORK_DIR}"
|
||||
cp /on-start.sh "${WORK_DIR}"/
|
||||
cp /peer-finder "${WORK_DIR}"/
|
||||
|
||||
echo installing redis-"${VERSION}" into "${INSTALL_VOLUME}"
|
||||
mkdir -p "${INSTALL_VOLUME}"
|
||||
mv /redis "${INSTALL_VOLUME}"/redis
|
||||
49
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/on-start.sh
generated
vendored
Executable file
49
vendor/k8s.io/kubernetes/test/images/pets/redis-installer/on-start.sh
generated
vendored
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# 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.
|
||||
|
||||
set -e
|
||||
|
||||
CFG=/opt/redis/redis.conf
|
||||
HOSTNAME=$(hostname)
|
||||
DATADIR="/data"
|
||||
# Port on which redis listens for connections.
|
||||
PORT=6379
|
||||
|
||||
# Ping everyone but ourself to see if there's a master. Only one pet starts at
|
||||
# a time, so if we don't see a master we can assume the position is ours.
|
||||
while read -ra LINE; do
|
||||
if [[ "${LINE}" == *"${HOSTNAME}"* ]]; then
|
||||
sed -i -e "s|^bind.*$|bind ${LINE}|" ${CFG}
|
||||
elif [ "$(/opt/redis/redis-cli -h $LINE info | grep role | sed 's,\r$,,')" = "role:master" ]; then
|
||||
# TODO: More restrictive regex?
|
||||
sed -i -e "s|^# slaveof.*$|slaveof ${LINE} ${PORT}|" ${CFG}
|
||||
fi
|
||||
done
|
||||
|
||||
# Set the data directory for append only log and snapshot files. This should
|
||||
# be a persistent volume for consistency.
|
||||
sed -i -e "s|^.*dir .*$|dir ${DATADIR}|" ${CFG}
|
||||
|
||||
# The append only log is written for every SET operation. Without this setting,
|
||||
# redis just snapshots periodically which is only safe for a cache. This will
|
||||
# produce an appendonly.aof file in the configured data dir.
|
||||
sed -i -e "s|^appendonly .*$|appendonly yes|" ${CFG}
|
||||
|
||||
# Every write triggers an fsync. Recommended default is "everysec", which
|
||||
# is only safe for AP applications.
|
||||
sed -i -e "s|^appendfsync .*$|appendfsync always|" ${CFG}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user