mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 02:07:58 +00:00
Add vendor folder to git
This commit is contained in:
parent
66cf5eaafb
commit
183585f56f
6916 changed files with 2629581 additions and 1 deletions
49
vendor/github.com/docker/distribution/contrib/docker-integration/install_certs.sh
generated
vendored
Normal file
49
vendor/github.com/docker/distribution/contrib/docker-integration/install_certs.sh
generated
vendored
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
hostname="localregistry"
|
||||
authhostname="auth.$hostname"
|
||||
|
||||
set_etc_hosts() {
|
||||
hostentry=$1
|
||||
IP=$(ifconfig eth0|grep "inet addr:"| cut -d: -f2 | awk '{ print $1}')
|
||||
echo "$IP $hostentry" >> /etc/hosts
|
||||
# TODO: Check if record already exists in /etc/hosts
|
||||
}
|
||||
|
||||
install_ca() {
|
||||
mkdir -p $1/$hostname:$2
|
||||
cp ./nginx/ssl/registry-ca+ca.pem $1/$hostname:$2/ca.crt
|
||||
if [ "$3" != "" ]; then
|
||||
cp ./nginx/ssl/registry-$3+client-cert.pem $1/$hostname:$2/client.cert
|
||||
cp ./nginx/ssl/registry-$3+client-key.pem $1/$hostname:$2/client.key
|
||||
fi
|
||||
}
|
||||
|
||||
install_test_certs() {
|
||||
install_ca $1 5440
|
||||
install_ca $1 5441
|
||||
install_ca $1 5442 ca
|
||||
install_ca $1 5443 noca
|
||||
install_ca $1 5444 ca
|
||||
install_ca $1 5447 ca
|
||||
# For test remove CA
|
||||
rm $1/${hostname}:5447/ca.crt
|
||||
install_ca $1 5448
|
||||
}
|
||||
|
||||
set_etc_hosts $hostname
|
||||
set_etc_hosts $authhostname
|
||||
|
||||
install_test_certs /etc/docker/certs.d
|
||||
install_test_certs /root/.docker/tls
|
||||
|
||||
# Malevolent server
|
||||
mkdir -p /etc/docker/certs.d/$hostname:6666
|
||||
cp ./malevolent-certs/ca.pem /etc/docker/certs.d/$hostname:6666/ca.crt
|
||||
|
||||
# Token server
|
||||
install_file ./tokenserver/certs/ca.pem $1 5555
|
||||
install_file ./tokenserver/certs/ca.pem $1 5554
|
||||
install_file ./tokenserver/certs/ca.pem $1 5557
|
||||
install_file ./tokenserver/certs/ca.pem $1 5558
|
||||
Loading…
Add table
Add a link
Reference in a new issue