Merge pull request #3733 from thypon/kubernetes
New package: kubernetes, etcd
This commit is contained in:
commit
422f4ffdfc
|
@ -0,0 +1,249 @@
|
|||
# Human_readable name for this member.
|
||||
#
|
||||
# default: "default"
|
||||
#
|
||||
# ETCD_NAME="default"
|
||||
|
||||
# Path to the data directory.
|
||||
#
|
||||
# default: "${name}.etcd"
|
||||
# distribution default: "/var/lib/etcd"
|
||||
#
|
||||
# ETCD_DATA_DIR="/var/lib/etcd"
|
||||
|
||||
# Path to the dedicated wal directory.
|
||||
# If this flag is set, etcd will write the WAL files
|
||||
# to the walDir rather than the dataDir.
|
||||
#
|
||||
# default: ""
|
||||
#
|
||||
# ETCD_WAL_DIR=""
|
||||
|
||||
# Number of committed transactions to trigger a snapshot to disk.
|
||||
#
|
||||
# default: 10000
|
||||
#
|
||||
# ETCD_SNAPSHOT_COUNT=10000
|
||||
|
||||
# Time (in milliseconds) of a heartbeat interval.
|
||||
#
|
||||
# default: 100
|
||||
#
|
||||
# ETCD_HEARTBEAT_INTERVAL=100
|
||||
|
||||
# Time (in milliseconds) for an election to timeout.
|
||||
#
|
||||
# default: 1000
|
||||
#
|
||||
# ETCD_ELECTION_TIMEOUT=1000
|
||||
|
||||
# List of URLs to listen on for peer traffic.
|
||||
#
|
||||
# default: "http://localhost:2380,http://localhost:7001"
|
||||
#
|
||||
# ETCD_LISTEN_PEER_URLS="http://localhost:2380,http://localhost:7001"
|
||||
|
||||
# List of URLs to listen on for client traffic.
|
||||
#
|
||||
# default: "http://localhost:2379,http://localhost:4001"
|
||||
#
|
||||
# ETCD_LISTEN_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
|
||||
|
||||
# Maximum number of snapshot files to retain (0 is unlimited)
|
||||
#
|
||||
# default: 5
|
||||
#
|
||||
# ETCD_MAX_SNAPSHOTS=5
|
||||
|
||||
# Maximum number of wal files to retain (0 is unlimited)
|
||||
#
|
||||
# default: 5
|
||||
#
|
||||
# ETCD_MAX_WALS=5
|
||||
|
||||
# Comma_separated white list of origins for CORS (cross_origin resource sharing).
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_CORS=
|
||||
|
||||
# List of this member's peer URLs to advertise to the rest of the cluster.
|
||||
# These addresses are used for communicating etcd data around the cluster.
|
||||
# At least one must be routable to all cluster members.
|
||||
#
|
||||
# default: "http://localhost:2380,http://localhost:7001"
|
||||
#
|
||||
# ETCD_INITIAL_ADVERTISE_PEER_URLS="http://localhost:2380,http://localhost:7001"
|
||||
|
||||
# Initial cluster configuration for bootstrapping.
|
||||
#
|
||||
# default: "default=http://localhost:2380,default=http://localhost:7001"
|
||||
# distribution default: "default=http://localhost:2380,default=http://localhost:7001"
|
||||
#
|
||||
# ETCD_INITIAL_CLUSTER="default=http://localhost:2380,default=http://localhost:7001"
|
||||
|
||||
# Initial cluster state ("new" or "existing").
|
||||
# Set to new for all members present during initial static or DNS bootstrapping.
|
||||
# If this option is set to existing, etcd will attempt to join the existing cluster.
|
||||
# If the wrong value is set, etcd will attempt to start but fail safely.
|
||||
#
|
||||
# default: "new"
|
||||
#
|
||||
# ETCD_INITIAL_CLUSTER_STATE="new"
|
||||
|
||||
# Initial cluster token for the etcd cluster during bootstrap.
|
||||
#
|
||||
# default: "etcd_cluster"
|
||||
#
|
||||
# ETCD_INITIAL_CLUSTER_TOKEN="etcd_cluster"
|
||||
|
||||
# List of this member's client URLs to advertise to the rest of the cluster.
|
||||
#
|
||||
# default: "http://localhost:2379,http://localhost:4001"
|
||||
#
|
||||
# ETCD_ADVERTISE_CLIENT_URLS="http://localhost:2379,http://localhost:4001"
|
||||
|
||||
# Discovery URL used to bootstrap the cluster.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_DISCOVERY=
|
||||
|
||||
# DNS srv domain used to bootstrap the cluster.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_DISCOVERY_SRV=
|
||||
|
||||
# Expected behavior ("exit" or "proxy") when discovery services fails.
|
||||
#
|
||||
# default: "proxy"
|
||||
#
|
||||
# ETCD_DISCOVERY_FALLBACK="proxy"
|
||||
|
||||
# HTTP proxy to use for traffic to discovery service.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_DISCOVERY_PROXY=
|
||||
|
||||
# Proxy mode setting ("off", "readonly" or "on").
|
||||
#
|
||||
# default: "off"
|
||||
#
|
||||
# ETCD_PROXY="off"
|
||||
|
||||
# Time (in milliseconds) an endpoint will be held
|
||||
# in a failed state before being reconsidered for proxied requests.
|
||||
#
|
||||
# default: 5000
|
||||
#
|
||||
# ETCD_PROXY_FAILURE_WAIT=5000
|
||||
|
||||
# Time (in milliseconds) of the endpoints refresh interval.
|
||||
#
|
||||
# default: 30000
|
||||
#
|
||||
# ETCD_PROXY_REFRESH_INTERVAL=30000
|
||||
|
||||
# Time (in milliseconds) for a dial to timeout or 0 to disable the timeout.
|
||||
#
|
||||
# default: 1000
|
||||
#
|
||||
# ETCD_PROXY_DIAL_TIMEOUT=1000
|
||||
|
||||
# Time (in milliseconds) for a write to timeout or 0 to disable the timeout.
|
||||
#
|
||||
# default: 5000
|
||||
#
|
||||
# ETCD_PROXY_WRITE_TIMEOUT=5000
|
||||
|
||||
# Time (in milliseconds) for a read to timeout or 0 to disable the timeout.
|
||||
# Don't change this value if you use watches because they are using long polling requests.
|
||||
#
|
||||
# default: 0
|
||||
#
|
||||
# ETCD_PROXY_READ_TIMEOUT=0
|
||||
|
||||
# Path to the client server TLS CA file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_CA_FILE=
|
||||
|
||||
# Path to the client server TLS cert file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_CERT_FILE=
|
||||
|
||||
# Path to the client server TLS key file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_KEY_FILE=
|
||||
|
||||
# Enable client cert authentication.
|
||||
#
|
||||
# default: false
|
||||
#
|
||||
# ETCD_CLIENT_CERT_AUTH=false
|
||||
|
||||
# Path to the client server TLS trusted CA key file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_TRUSTED_CA_FILE=
|
||||
|
||||
# [DEPRECATED] Path to the peer server TLS CA file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_PEER_CA_FILE=
|
||||
|
||||
# Path to the peer server TLS cert file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_PEER_CERT_FILE=
|
||||
|
||||
# Path to the peer server TLS key file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_PEER_KEY_FILE=
|
||||
|
||||
# Enable peer client cert authentication.
|
||||
#
|
||||
# default: false
|
||||
#
|
||||
# ETCD_PEER_CLIENT_CERT_AUTH=false
|
||||
|
||||
# Path to the peer server TLS trusted CA file.
|
||||
#
|
||||
# default: none
|
||||
#
|
||||
# ETCD_PEER_TRUSTED_CA_FILE=
|
||||
|
||||
# Drop the default log level to DEBUG for all subpackages.
|
||||
#
|
||||
# default: false (INFO for all packages)
|
||||
#
|
||||
# ETCD_DEBUG=false
|
||||
|
||||
# Set individual etcd subpackages to specific log levels.
|
||||
# An example being etcdserver=WARNING,security=DEBUG
|
||||
#
|
||||
# default: none (INFO for all packages)
|
||||
#
|
||||
# ETCD_LOG_PACKAGE_LEVELS=
|
||||
|
||||
# Force to create a new one_member cluster.
|
||||
# It commits configuration changes in force to remove all existing members in the cluster and add itself.
|
||||
# It needs to be set to restore a backup.
|
||||
#
|
||||
# default: false
|
||||
#
|
||||
# ETCD_FORCE_NEW_CLUSTER=false
|
||||
|
||||
# vim:ft=sh:
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
export ETCD_DATA_DIR=/var/lib/etcd
|
||||
export ETCD_NAME=etcd
|
||||
|
||||
[ -r conf ] && . ./conf
|
||||
exec chpst -u etcd:etcd etcd
|
|
@ -0,0 +1,24 @@
|
|||
# Template file for 'etcd'
|
||||
pkgname=etcd
|
||||
version=2.2.5
|
||||
revision=1
|
||||
build_style=go
|
||||
short_desc="Distributed reliable key-value store"
|
||||
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
|
||||
license="Apache-2.0"
|
||||
go_import_path="github.com/coreos/etcd"
|
||||
homepage="https://coreos.com/etcd/docs/latest/"
|
||||
distfiles="https://${go_import_path}/archive/v${version}.tar.gz"
|
||||
checksum=a7fb7998ada620fda74e517c100891d25a15a6fa20b627df52da7cd29328e6d5
|
||||
conf_files="/etc/sv/etcd/conf"
|
||||
system_accounts="etcd"
|
||||
make_dirs="/var/lib/etcd 0755 etcd etcd"
|
||||
|
||||
post_build() {
|
||||
go get -x ${go_import_path}/etcdctl
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
vsv etcd
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
###
|
||||
# kubernetes system config
|
||||
#
|
||||
# The following values are used to configure the kube-apiserver
|
||||
#
|
||||
|
||||
# The address on the local server to listen to.
|
||||
KUBE_API_ADDRESS="--insecure-bind-address=127.0.0.1"
|
||||
|
||||
# The port on the local server to listen on.
|
||||
# KUBE_API_PORT="--port=8080"
|
||||
|
||||
# Port minions listen on
|
||||
# KUBELET_PORT="--kubelet-port=10250"
|
||||
|
||||
# Comma separated list of nodes in the etcd cluster
|
||||
KUBE_ETCD_SERVERS="--etcd-servers=http://127.0.0.1:4001"
|
||||
|
||||
# Address range to use for services
|
||||
KUBE_SERVICE_ADDRESSES="--service-cluster-ip-range=10.254.0.0/16"
|
||||
|
||||
# default admission control policies
|
||||
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"
|
||||
|
||||
# Add your own!
|
||||
KUBE_API_ARGS=""
|
|
@ -0,0 +1,22 @@
|
|||
###
|
||||
# kubernetes system config
|
||||
#
|
||||
# The following values are used to configure various aspects of all
|
||||
# kubernetes services, including
|
||||
#
|
||||
# kube-apiserver.service
|
||||
# kube-controller-manager.service
|
||||
# kube-scheduler.service
|
||||
# kubelet.service
|
||||
# kube-proxy.service
|
||||
# logging to stderr means we get it in the systemd journal
|
||||
KUBE_LOGTOSTDERR="--logtostderr=true"
|
||||
|
||||
# journal message level, 0 is debug
|
||||
KUBE_LOG_LEVEL="--v=0"
|
||||
|
||||
# Should this cluster be allowed to run privileged docker containers
|
||||
KUBE_ALLOW_PRIV="--allow-privileged=false"
|
||||
|
||||
# How the controller-manager, scheduler, and proxy find the apiserver
|
||||
KUBE_MASTER="--master=http://127.0.0.1:8080"
|
|
@ -0,0 +1,7 @@
|
|||
###
|
||||
# The following values are used to configure the kubernetes controller-manager
|
||||
|
||||
# defaults from config and apiserver should be adequate
|
||||
|
||||
# Add your own!
|
||||
KUBE_CONTROLLER_MANAGER_ARGS=""
|
|
@ -0,0 +1,17 @@
|
|||
###
|
||||
# kubernetes kubelet (minion) config
|
||||
|
||||
# The address for the info server to serve on (set to 0.0.0.0 or "" for all interfaces)
|
||||
KUBELET_ADDRESS="--address=127.0.0.1"
|
||||
|
||||
# The port for the info server to serve on
|
||||
# KUBELET_PORT="--port=10250"
|
||||
|
||||
# You may leave this blank to use the actual hostname
|
||||
KUBELET_HOSTNAME="--hostname-override=127.0.0.1"
|
||||
|
||||
# location of the api-server
|
||||
KUBELET_API_SERVER="--api-servers=http://127.0.0.1:8080"
|
||||
|
||||
# Add your own!
|
||||
KUBELET_ARGS=""
|
|
@ -0,0 +1,7 @@
|
|||
###
|
||||
# kubernetes proxy config
|
||||
|
||||
# default config should be adequate
|
||||
|
||||
# Add your own!
|
||||
KUBE_PROXY_ARGS=""
|
|
@ -0,0 +1,7 @@
|
|||
###
|
||||
# kubernetes scheduler config
|
||||
|
||||
# default config should be adequate
|
||||
|
||||
# Add your own!
|
||||
KUBE_SCHEDULER_ARGS=""
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
[ -r /etc/kubernetes/config ] && . /etc/kubernetes/config
|
||||
[ -r /etc/kubernetes/apiserver ] && . /etc/kubernetes/apiserver
|
||||
exec chpst -u kube:kube kube-apiserver \
|
||||
$KUBE_LOGTOSTDERR \
|
||||
$KUBE_LOG_LEVEL \
|
||||
$KUBE_ETCD_SERVERS \
|
||||
$KUBE_API_ADDRESS \
|
||||
$KUBE_API_PORT \
|
||||
$KUBELET_PORT \
|
||||
$KUBE_ALLOW_PRIV \
|
||||
$KUBE_SERVICE_ADDRESSES \
|
||||
$KUBE_ADMISSION_CONTROL \
|
||||
$KUBE_API_ARGS 2>/dev/null
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
[ -r /etc/kubernetes/config ] && . /etc/kubernetes/config
|
||||
[ -r /etc/kubernetes/controller-manager ] && . /etc/kubernetes/controller-manager
|
||||
exec chpst -u kube:kube kube-controller-manager \
|
||||
$KUBE_LOGTOSTDERR \
|
||||
$KUBE_LOG_LEVEL \
|
||||
$KUBE_MASTER \
|
||||
$KUBE_CONTROLLER_MANAGER_ARGS 2>/dev/null
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
[ -r /etc/kubernetes/config ] && . /etc/kubernetes/config
|
||||
[ -r /etc/kubernetes/proxy ] && . /etc/kubernetes/proxy
|
||||
exec kube-proxy \
|
||||
$KUBE_LOGTOSTDERR \
|
||||
$KUBE_LOG_LEVEL \
|
||||
$KUBE_MASTER \
|
||||
$KUBE_PROXY_ARGS 2>/dev/null
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
[ -r /etc/kubernetes/config ] && . /etc/kubernetes/config
|
||||
[ -r /etc/kubernetes/scheduler ] && . /etc/kubernetes/scheduler
|
||||
exec chpst -u kube:kube kube-scheduler \
|
||||
$KUBE_LOGTOSTDERR \
|
||||
$KUBE_LOG_LEVEL \
|
||||
$KUBE_MASTER \
|
||||
$KUBE_SCHEDULER_ARGS 2>/dev/null
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
[ -r /etc/kubernetes/config ] && . /etc/kubernetes/config
|
||||
[ -r /etc/kubernetes/kubelet ] && . /etc/kubernetes/kubelet
|
||||
exec kubelet $OPTS 2>/dev/null
|
|
@ -0,0 +1,46 @@
|
|||
# Template file for 'kubernetes'
|
||||
pkgname=kubernetes
|
||||
version=1.1.8
|
||||
revision=1
|
||||
build_style=go
|
||||
nocross=yes
|
||||
only_for_archs="x86_64 x86_64-musl"
|
||||
hostmakedepends="rsync git git-perl"
|
||||
short_desc="Container Cluster Manager for Docker"
|
||||
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
|
||||
license="Apache-2.0"
|
||||
go_import_path="github.com/kubernetes/kubernetes"
|
||||
homepage="http://kubernetes.io"
|
||||
distfiles="https://$go_import_path/archive/v$version.tar.gz"
|
||||
checksum=fbc1a01edc6683dc3c59830a63622730c5baece1e02dfa1cd32a852bf4415581
|
||||
system_accounts="kube"
|
||||
make_dirs="/var/lib/kubelet 0755 kube kube"
|
||||
conf_files="/etc/kubernetes/*"
|
||||
|
||||
do_build() {
|
||||
./hack/build-go.sh
|
||||
}
|
||||
|
||||
do_install() {
|
||||
find "_output/local/bin/linux/" -type f -executable | grep "kube" | egrep -v "gen|test" | while read line
|
||||
do
|
||||
vbin "${line}"
|
||||
done
|
||||
|
||||
for MAN in docs/man/man1/*.1; do
|
||||
vman ${MAN}
|
||||
done
|
||||
|
||||
vinstall contrib/completions/bash/kubectl 644 usr/share/bash-completion/completions
|
||||
|
||||
vmkdir etc/kubernetes
|
||||
vcopy ${FILESDIR}/environ/* etc/kubernetes
|
||||
|
||||
vsv kube-apiserver
|
||||
vsv kube-controller-manager
|
||||
vsv kubelet
|
||||
vsv kube-scheduler
|
||||
vsv kube-proxy
|
||||
|
||||
vlicense LICENSE
|
||||
}
|
Loading…
Reference in New Issue