Add glide.yaml and vendor deps
This commit is contained in:
parent
db918f12ad
commit
5b3d5e81bd
18880 changed files with 5166045 additions and 1 deletions
43
vendor/k8s.io/kubernetes/cluster/gce/config-common.sh
generated
vendored
Normal file
43
vendor/k8s.io/kubernetes/cluster/gce/config-common.sh
generated
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#!/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.
|
||||
|
||||
# Vars assumed:
|
||||
# NUM_NODES
|
||||
function get-master-size {
|
||||
local suggested_master_size=1
|
||||
if [[ "${NUM_NODES}" -gt "5" ]]; then
|
||||
suggested_master_size=2
|
||||
fi
|
||||
if [[ "${NUM_NODES}" -gt "10" ]]; then
|
||||
suggested_master_size=4
|
||||
fi
|
||||
if [[ "${NUM_NODES}" -gt "100" ]]; then
|
||||
suggested_master_size=8
|
||||
fi
|
||||
if [[ "${NUM_NODES}" -gt "250" ]]; then
|
||||
suggested_master_size=16
|
||||
fi
|
||||
if [[ "${NUM_NODES}" -gt "500" ]]; then
|
||||
suggested_master_size=32
|
||||
fi
|
||||
echo "${suggested_master_size}"
|
||||
}
|
||||
|
||||
if [[ "${FEDERATION:-}" == true ]]; then
|
||||
NODE_SCOPES="${NODE_SCOPES:-compute-rw,monitoring,logging-write,storage-ro,https://www.googleapis.com/auth/ndev.clouddns.readwrite}"
|
||||
else
|
||||
NODE_SCOPES="${NODE_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}"
|
||||
fi
|
||||
179
vendor/k8s.io/kubernetes/cluster/gce/config-default.sh
generated
vendored
Executable file
179
vendor/k8s.io/kubernetes/cluster/gce/config-default.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,179 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2014 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(jbeda): Provide a way to override project
|
||||
# gcloud multiplexing for shared GCE/GKE tests.
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/cluster/gce/config-common.sh"
|
||||
|
||||
GCLOUD=gcloud
|
||||
ZONE=${KUBE_GCE_ZONE:-us-central1-b}
|
||||
REGION=${ZONE%-*}
|
||||
RELEASE_REGION_FALLBACK=${RELEASE_REGION_FALLBACK:-false}
|
||||
REGIONAL_KUBE_ADDONS=${REGIONAL_KUBE_ADDONS:-true}
|
||||
NODE_SIZE=${NODE_SIZE:-n1-standard-2}
|
||||
NUM_NODES=${NUM_NODES:-3}
|
||||
MASTER_SIZE=${MASTER_SIZE:-n1-standard-$(get-master-size)}
|
||||
MASTER_DISK_TYPE=pd-ssd
|
||||
MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB}
|
||||
NODE_DISK_TYPE=${NODE_DISK_TYPE:-pd-standard}
|
||||
NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB}
|
||||
REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true}
|
||||
PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false}
|
||||
PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false}
|
||||
KUBE_DELETE_NODES=${KUBE_DELETE_NODES:-true}
|
||||
KUBE_DELETE_NETWORK=${KUBE_DELETE_NETWORK:-false}
|
||||
|
||||
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
|
||||
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-debian}}
|
||||
# By default a cluster will be started with the master on GCI and nodes on
|
||||
# containervm. If you are updating the containervm version, update this
|
||||
# variable. Also please update corresponding image for node e2e at:
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/jenkins/image-config.yaml
|
||||
CVM_VERSION=container-vm-v20161025
|
||||
GCI_VERSION="gci-dev-56-8977-0-0"
|
||||
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
|
||||
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
|
||||
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
|
||||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
|
||||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
||||
RKT_VERSION=${KUBE_RKT_VERSION:-1.14.0}
|
||||
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos}
|
||||
|
||||
NETWORK=${KUBE_GCE_NETWORK:-default}
|
||||
INSTANCE_PREFIX="${KUBE_GCE_INSTANCE_PREFIX:-kubernetes}"
|
||||
CLUSTER_NAME="${CLUSTER_NAME:-${INSTANCE_PREFIX}}"
|
||||
MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||
INITIAL_ETCD_CLUSTER="${MASTER_NAME}"
|
||||
ETCD_QUORUM_READ="${ENABLE_ETCD_QUORUM_READ:-false}"
|
||||
MASTER_TAG="${INSTANCE_PREFIX}-master"
|
||||
NODE_TAG="${INSTANCE_PREFIX}-minion"
|
||||
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
|
||||
CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.244.0.0/14}"
|
||||
if [[ "${FEDERATION:-}" == true ]]; then
|
||||
NODE_SCOPES="${NODE_SCOPES:-compute-rw,monitoring,logging-write,storage-ro,https://www.googleapis.com/auth/ndev.clouddns.readwrite}"
|
||||
else
|
||||
NODE_SCOPES="${NODE_SCOPES:-compute-rw,monitoring,logging-write,storage-ro}"
|
||||
fi
|
||||
|
||||
|
||||
# Extra docker options for nodes.
|
||||
EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS:-}"
|
||||
|
||||
SERVICE_CLUSTER_IP_RANGE="${SERVICE_CLUSTER_IP_RANGE:-10.0.0.0/16}" # formerly PORTAL_NET
|
||||
ALLOCATE_NODE_CIDRS=true
|
||||
|
||||
# When set to true, Docker Cache is enabled by default as part of the cluster bring up.
|
||||
ENABLE_DOCKER_REGISTRY_CACHE=true
|
||||
|
||||
# Optional: Deploy a L7 loadbalancer controller to fulfill Ingress requests:
|
||||
# glbc - CE L7 Load Balancer Controller
|
||||
ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
|
||||
|
||||
# Optional: Cluster monitoring to setup as part of the cluster bring up:
|
||||
# none - No cluster monitoring setup
|
||||
# influxdb - Heapster, InfluxDB, and Grafana
|
||||
# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging
|
||||
# googleinfluxdb - Enable influxdb and google (except GCM)
|
||||
# standalone - Heapster only. Metrics available via Heapster REST API.
|
||||
ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
|
||||
|
||||
# Optional: Enable node logging.
|
||||
ENABLE_NODE_LOGGING="${KUBE_ENABLE_NODE_LOGGING:-true}"
|
||||
LOGGING_DESTINATION="${KUBE_LOGGING_DESTINATION:-gcp}" # options: elasticsearch, gcp
|
||||
|
||||
# Optional: When set to true, Elasticsearch and Kibana will be setup as part of the cluster bring up.
|
||||
ENABLE_CLUSTER_LOGGING="${KUBE_ENABLE_CLUSTER_LOGGING:-true}"
|
||||
ELASTICSEARCH_LOGGING_REPLICAS=1
|
||||
|
||||
# Optional: Don't require https for registries in our local RFC1918 network
|
||||
if [[ ${KUBE_ENABLE_INSECURE_REGISTRY:-false} == "true" ]]; then
|
||||
EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS} --insecure-registry 10.0.0.0/8"
|
||||
fi
|
||||
|
||||
# Optional: customize runtime config
|
||||
RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
|
||||
|
||||
# Optional: set feature gates
|
||||
FEATURE_GATES="${KUBE_FEATURE_GATES:-}"
|
||||
|
||||
# Optional: Install cluster DNS.
|
||||
ENABLE_CLUSTER_DNS="${KUBE_ENABLE_CLUSTER_DNS:-true}"
|
||||
DNS_SERVER_IP="${KUBE_DNS_SERVER_IP:-10.0.0.10}"
|
||||
DNS_DOMAIN="${KUBE_DNS_DOMAIN:-cluster.local}"
|
||||
|
||||
# Optional: Enable DNS horizontal autoscaler
|
||||
ENABLE_DNS_HORIZONTAL_AUTOSCALER="${KUBE_ENABLE_DNS_HORIZONTAL_AUTOSCALER:-true}"
|
||||
|
||||
# Optional: Install cluster docker registry.
|
||||
ENABLE_CLUSTER_REGISTRY="${KUBE_ENABLE_CLUSTER_REGISTRY:-false}"
|
||||
CLUSTER_REGISTRY_DISK="${CLUSTER_REGISTRY_PD:-${INSTANCE_PREFIX}-kube-system-kube-registry}"
|
||||
CLUSTER_REGISTRY_DISK_SIZE="${CLUSTER_REGISTRY_DISK_SIZE:-200GB}"
|
||||
CLUSTER_REGISTRY_DISK_TYPE_GCE="${CLUSTER_REGISTRY_DISK_TYPE_GCE:-pd-standard}"
|
||||
|
||||
# Optional: Install Kubernetes UI
|
||||
ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
|
||||
|
||||
# Optional: Install node problem detector.
|
||||
ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-true}"
|
||||
|
||||
# Optional: Create autoscaler for cluster's nodes.
|
||||
ENABLE_CLUSTER_AUTOSCALER="${KUBE_ENABLE_CLUSTER_AUTOSCALER:-false}"
|
||||
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
|
||||
AUTOSCALER_MIN_NODES="${KUBE_AUTOSCALER_MIN_NODES:-}"
|
||||
AUTOSCALER_MAX_NODES="${KUBE_AUTOSCALER_MAX_NODES:-}"
|
||||
AUTOSCALER_ENABLE_SCALE_DOWN="${KUBE_AUTOSCALER_ENABLE_SCALE_DOWN:-true}"
|
||||
fi
|
||||
|
||||
# Optional: Enable Rescheduler
|
||||
ENABLE_RESCHEDULER="${KUBE_ENABLE_RESCHEDULER:-true}"
|
||||
|
||||
# Admission Controllers to invoke prior to persisting objects in cluster
|
||||
# If we included ResourceQuota, we should keep it at the end of the list to prevent incrementing quota usage prematurely.
|
||||
ADMISSION_CONTROL=NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota
|
||||
|
||||
# Optional: if set to true kube-up will automatically check for existing resources and clean them up.
|
||||
KUBE_UP_AUTOMATIC_CLEANUP=${KUBE_UP_AUTOMATIC_CLEANUP:-false}
|
||||
|
||||
# Storage backend. 'etcd2' supported, 'etcd3' experimental.
|
||||
STORAGE_BACKEND=${STORAGE_BACKEND:-}
|
||||
|
||||
# Networking plugin specific settings.
|
||||
NETWORK_PROVIDER="${NETWORK_PROVIDER:-kubenet}" # none, opencontrail, kubenet
|
||||
OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}"
|
||||
OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}"
|
||||
OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}"
|
||||
|
||||
# Network Policy plugin specific settings.
|
||||
NETWORK_POLICY_PROVIDER="${NETWORK_POLICY_PROVIDER:-none}" # calico
|
||||
|
||||
# How should the kubelet configure hairpin mode?
|
||||
HAIRPIN_MODE="${HAIRPIN_MODE:-promiscuous-bridge}" # promiscuous-bridge, hairpin-veth, none
|
||||
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
|
||||
E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false}
|
||||
|
||||
# Evict pods whenever compute resource availability on the nodes gets below a threshold.
|
||||
EVICTION_HARD="${EVICTION_HARD:-memory.available<250Mi,nodefs.available<10%,nodefs.inodesFree<5%}"
|
||||
|
||||
# Optional: custom scheduling algorithm
|
||||
SCHEDULING_ALGORITHM_PROVIDER="${SCHEDULING_ALGORITHM_PROVIDER:-}"
|
||||
|
||||
# Optional: install a default StorageClass
|
||||
ENABLE_DEFAULT_STORAGE_CLASS="${ENABLE_DEFAULT_STORAGE_CLASS:-true}"
|
||||
|
||||
# TODO(dawn1107): Remove this once the flag is built into CVM image.
|
||||
# Kernel panic upon soft lockup issue
|
||||
SOFTLOCKUP_PANIC="${SOFTLOCKUP_PANIC:-false}" # true, false
|
||||
216
vendor/k8s.io/kubernetes/cluster/gce/config-test.sh
generated
vendored
Executable file
216
vendor/k8s.io/kubernetes/cluster/gce/config-test.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,216 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2014 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(jbeda): Provide a way to override project
|
||||
# gcloud multiplexing for shared GCE/GKE tests.
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/cluster/gce/config-common.sh"
|
||||
|
||||
GCLOUD=gcloud
|
||||
ZONE=${KUBE_GCE_ZONE:-us-central1-b}
|
||||
REGION=${ZONE%-*}
|
||||
RELEASE_REGION_FALLBACK=${RELEASE_REGION_FALLBACK:-false}
|
||||
REGIONAL_KUBE_ADDONS=${REGIONAL_KUBE_ADDONS:-true}
|
||||
NODE_SIZE=${NODE_SIZE:-n1-standard-2}
|
||||
NUM_NODES=${NUM_NODES:-3}
|
||||
MASTER_SIZE=${MASTER_SIZE:-n1-standard-$(get-master-size)}
|
||||
MASTER_DISK_TYPE=pd-ssd
|
||||
MASTER_DISK_SIZE=${MASTER_DISK_SIZE:-20GB}
|
||||
NODE_DISK_TYPE=${NODE_DISK_TYPE:-pd-standard}
|
||||
NODE_DISK_SIZE=${NODE_DISK_SIZE:-100GB}
|
||||
REGISTER_MASTER_KUBELET=${REGISTER_MASTER:-true}
|
||||
KUBE_APISERVER_REQUEST_TIMEOUT=300
|
||||
PREEMPTIBLE_NODE=${PREEMPTIBLE_NODE:-false}
|
||||
PREEMPTIBLE_MASTER=${PREEMPTIBLE_MASTER:-false}
|
||||
KUBE_DELETE_NODES=${KUBE_DELETE_NODES:-true}
|
||||
KUBE_DELETE_NETWORK=${KUBE_DELETE_NETWORK:-true}
|
||||
|
||||
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
|
||||
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-debian}}
|
||||
# By default a cluster will be started with the master on GCI and nodes on
|
||||
# containervm. If you are updating the containervm version, update this
|
||||
# variable. Also please update corresponding image for node e2e at:
|
||||
# https://github.com/kubernetes/kubernetes/blob/master/test/e2e_node/jenkins/image-config.yaml
|
||||
CVM_VERSION=container-vm-v20161025
|
||||
GCI_VERSION="gci-dev-56-8977-0-0"
|
||||
MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
|
||||
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-google-containers}
|
||||
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${CVM_VERSION}}
|
||||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-google-containers}
|
||||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
||||
GCI_DOCKER_VERSION=${KUBE_GCI_DOCKER_VERSION:-}
|
||||
RKT_VERSION=${KUBE_RKT_VERSION:-1.14.0}
|
||||
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos}
|
||||
|
||||
NETWORK=${KUBE_GCE_NETWORK:-e2e}
|
||||
INSTANCE_PREFIX="${KUBE_GCE_INSTANCE_PREFIX:-e2e-test-${USER}}"
|
||||
CLUSTER_NAME="${CLUSTER_NAME:-${INSTANCE_PREFIX}}"
|
||||
MASTER_NAME="${INSTANCE_PREFIX}-master"
|
||||
INITIAL_ETCD_CLUSTER="${MASTER_NAME}"
|
||||
ETCD_QUORUM_READ="${ENABLE_ETCD_QUORUM_READ:-false}"
|
||||
MASTER_TAG="${INSTANCE_PREFIX}-master"
|
||||
NODE_TAG="${INSTANCE_PREFIX}-minion"
|
||||
CLUSTER_IP_RANGE="${CLUSTER_IP_RANGE:-10.180.0.0/14}"
|
||||
MASTER_IP_RANGE="${MASTER_IP_RANGE:-10.246.0.0/24}"
|
||||
RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
|
||||
|
||||
# Optional: set feature gates
|
||||
FEATURE_GATES="${KUBE_FEATURE_GATES:-}"
|
||||
|
||||
TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100}
|
||||
|
||||
# Extra docker options for nodes.
|
||||
EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS:-}"
|
||||
|
||||
# Enable the docker debug mode.
|
||||
EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS} --debug"
|
||||
|
||||
SERVICE_CLUSTER_IP_RANGE="10.0.0.0/16" # formerly PORTAL_NET
|
||||
|
||||
# When set to true, Docker Cache is enabled by default as part of the cluster bring up.
|
||||
ENABLE_DOCKER_REGISTRY_CACHE=true
|
||||
|
||||
# Optional: Deploy a L7 loadbalancer controller to fulfill Ingress requests:
|
||||
# glbc - CE L7 Load Balancer Controller
|
||||
ENABLE_L7_LOADBALANCING="${KUBE_ENABLE_L7_LOADBALANCING:-glbc}"
|
||||
|
||||
# Optional: Cluster monitoring to setup as part of the cluster bring up:
|
||||
# none - No cluster monitoring setup
|
||||
# influxdb - Heapster, InfluxDB, and Grafana
|
||||
# google - Heapster, Google Cloud Monitoring, and Google Cloud Logging
|
||||
# googleinfluxdb - Enable influxdb and google (except GCM)
|
||||
# standalone - Heapster only. Metrics available via Heapster REST API.
|
||||
ENABLE_CLUSTER_MONITORING="${KUBE_ENABLE_CLUSTER_MONITORING:-influxdb}"
|
||||
|
||||
# Set etcd image (e.g. 3.0.14-experimental.1) version (e.g. 3.0.14) if you need
|
||||
# non-default version.
|
||||
ETCD_IMAGE="${TEST_ETCD_IMAGE:-}"
|
||||
ETCD_VERSION="${TEST_ETCD_VERSION:-}"
|
||||
|
||||
# Default Log level for all components in test clusters and variables to override it in specific components.
|
||||
TEST_CLUSTER_LOG_LEVEL="${TEST_CLUSTER_LOG_LEVEL:---v=4}"
|
||||
KUBELET_TEST_LOG_LEVEL="${KUBELET_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
|
||||
DOCKER_TEST_LOG_LEVEL="${DOCKER_TEST_LOG_LEVEL:---log-level=info}"
|
||||
API_SERVER_TEST_LOG_LEVEL="${API_SERVER_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
|
||||
CONTROLLER_MANAGER_TEST_LOG_LEVEL="${CONTROLLER_MANAGER_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
|
||||
SCHEDULER_TEST_LOG_LEVEL="${SCHEDULER_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
|
||||
KUBEPROXY_TEST_LOG_LEVEL="${KUBEPROXY_TEST_LOG_LEVEL:-$TEST_CLUSTER_LOG_LEVEL}"
|
||||
|
||||
TEST_CLUSTER_DELETE_COLLECTION_WORKERS="${TEST_CLUSTER_DELETE_COLLECTION_WORKERS:---delete-collection-workers=1}"
|
||||
TEST_CLUSTER_MAX_REQUESTS_INFLIGHT="${TEST_CLUSTER_MAX_REQUESTS_INFLIGHT:-}"
|
||||
TEST_CLUSTER_RESYNC_PERIOD="${TEST_CLUSTER_RESYNC_PERIOD:---min-resync-period=3m}"
|
||||
|
||||
# ContentType used by all components to communicate with apiserver.
|
||||
TEST_CLUSTER_API_CONTENT_TYPE="${TEST_CLUSTER_API_CONTENT_TYPE:-}"
|
||||
# ContentType used to store objects in underlying database.
|
||||
TEST_CLUSTER_STORAGE_CONTENT_TYPE="${TEST_CLUSTER_STORAGE_CONTENT_TYPE:-}"
|
||||
|
||||
KUBELET_TEST_ARGS="${KUBELET_TEST_ARGS:-} --max-pods=110 --serialize-image-pulls=false --outofdisk-transition-frequency=0 ${TEST_CLUSTER_API_CONTENT_TYPE}"
|
||||
APISERVER_TEST_ARGS="${APISERVER_TEST_ARGS:-} --runtime-config=extensions/v1beta1 ${TEST_CLUSTER_DELETE_COLLECTION_WORKERS} ${TEST_CLUSTER_MAX_REQUESTS_INFLIGHT} ${TEST_CLUSTER_STORAGE_CONTENT_TYPE}"
|
||||
CONTROLLER_MANAGER_TEST_ARGS="${CONTROLLER_MANAGER_TEST_ARGS:-} ${TEST_CLUSTER_RESYNC_PERIOD} ${TEST_CLUSTER_API_CONTENT_TYPE}"
|
||||
SCHEDULER_TEST_ARGS="${SCHEDULER_TEST_ARGS:-} ${TEST_CLUSTER_API_CONTENT_TYPE}"
|
||||
KUBEPROXY_TEST_ARGS="${KUBEPROXY_TEST_ARGS:-} ${TEST_CLUSTER_API_CONTENT_TYPE}"
|
||||
|
||||
# Optional: Enable node logging.
|
||||
ENABLE_NODE_LOGGING="${KUBE_ENABLE_NODE_LOGGING:-true}"
|
||||
LOGGING_DESTINATION="${KUBE_LOGGING_DESTINATION:-gcp}" # options: elasticsearch, gcp
|
||||
|
||||
# Optional: When set to true, Elasticsearch and Kibana will be setup as part of the cluster bring up.
|
||||
ENABLE_CLUSTER_LOGGING="${KUBE_ENABLE_CLUSTER_LOGGING:-true}"
|
||||
ELASTICSEARCH_LOGGING_REPLICAS=1
|
||||
|
||||
# Optional: Don't require https for registries in our local RFC1918 network
|
||||
if [[ ${KUBE_ENABLE_INSECURE_REGISTRY:-false} == "true" ]]; then
|
||||
EXTRA_DOCKER_OPTS="${EXTRA_DOCKER_OPTS} --insecure-registry 10.0.0.0/8"
|
||||
fi
|
||||
|
||||
# Optional: Install cluster DNS.
|
||||
ENABLE_CLUSTER_DNS="${KUBE_ENABLE_CLUSTER_DNS:-true}"
|
||||
DNS_SERVER_IP="10.0.0.10"
|
||||
DNS_DOMAIN="cluster.local"
|
||||
|
||||
# Optional: Enable DNS horizontal autoscaler
|
||||
ENABLE_DNS_HORIZONTAL_AUTOSCALER="${KUBE_ENABLE_DNS_HORIZONTAL_AUTOSCALER:-true}"
|
||||
|
||||
# Optional: Install cluster docker registry.
|
||||
ENABLE_CLUSTER_REGISTRY="${KUBE_ENABLE_CLUSTER_REGISTRY:-false}"
|
||||
CLUSTER_REGISTRY_DISK="${CLUSTER_REGISTRY_DISK:-${INSTANCE_PREFIX}-kube-system-kube-registry}"
|
||||
CLUSTER_REGISTRY_DISK_SIZE="${CLUSTER_REGISTRY_DISK_SIZE:-200GB}"
|
||||
CLUSTER_REGISTRY_DISK_TYPE_GCE="${CLUSTER_REGISTRY_DISK_TYPE_GCE:-pd-standard}"
|
||||
|
||||
# Optional: Install Kubernetes UI
|
||||
ENABLE_CLUSTER_UI="${KUBE_ENABLE_CLUSTER_UI:-true}"
|
||||
|
||||
# Optional: Install node problem detector.
|
||||
ENABLE_NODE_PROBLEM_DETECTOR="${KUBE_ENABLE_NODE_PROBLEM_DETECTOR:-true}"
|
||||
|
||||
# Optional: Create autoscaler for cluster's nodes.
|
||||
ENABLE_CLUSTER_AUTOSCALER="${KUBE_ENABLE_CLUSTER_AUTOSCALER:-false}"
|
||||
if [[ "${ENABLE_CLUSTER_AUTOSCALER}" == "true" ]]; then
|
||||
AUTOSCALER_MIN_NODES="${KUBE_AUTOSCALER_MIN_NODES:-}"
|
||||
AUTOSCALER_MAX_NODES="${KUBE_AUTOSCALER_MAX_NODES:-}"
|
||||
AUTOSCALER_ENABLE_SCALE_DOWN="${KUBE_AUTOSCALER_ENABLE_SCALE_DOWN:-false}"
|
||||
fi
|
||||
|
||||
# Optional: Enable Rescheduler
|
||||
ENABLE_RESCHEDULER="${KUBE_ENABLE_RESCHEDULER:-true}"
|
||||
|
||||
# If we included ResourceQuota, we should keep it at the end of the list to prevent incrementing quota usage prematurely.
|
||||
ADMISSION_CONTROL="${KUBE_ADMISSION_CONTROL:-NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeLabel,DefaultStorageClass,ResourceQuota}"
|
||||
|
||||
# Optional: if set to true kube-up will automatically check for existing resources and clean them up.
|
||||
KUBE_UP_AUTOMATIC_CLEANUP=${KUBE_UP_AUTOMATIC_CLEANUP:-false}
|
||||
|
||||
# Optional: setting it to true denotes this is a testing cluster,
|
||||
# so that we can use pulled kubernetes binaries, even if binaries
|
||||
# are pre-installed in the image. Note that currently this logic
|
||||
# is only supported in trusty or GCI.
|
||||
TEST_CLUSTER="${TEST_CLUSTER:-true}"
|
||||
|
||||
# Storage backend. 'etcd2' supported, 'etcd3' experimental.
|
||||
STORAGE_BACKEND=${STORAGE_BACKEND:-}
|
||||
|
||||
# OpenContrail networking plugin specific settings
|
||||
NETWORK_PROVIDER="${NETWORK_PROVIDER:-kubenet}" # none, opencontrail, kubenet
|
||||
OPENCONTRAIL_TAG="${OPENCONTRAIL_TAG:-R2.20}"
|
||||
OPENCONTRAIL_KUBERNETES_TAG="${OPENCONTRAIL_KUBERNETES_TAG:-master}"
|
||||
OPENCONTRAIL_PUBLIC_SUBNET="${OPENCONTRAIL_PUBLIC_SUBNET:-10.1.0.0/16}"
|
||||
|
||||
# Network Policy plugin specific settings.
|
||||
NETWORK_POLICY_PROVIDER="${NETWORK_POLICY_PROVIDER:-none}" # calico
|
||||
|
||||
# How should the kubelet configure hairpin mode?
|
||||
HAIRPIN_MODE="${HAIRPIN_MODE:-promiscuous-bridge}" # promiscuous-bridge, hairpin-veth, none
|
||||
|
||||
# Optional: if set to true, kube-up will configure the cluster to run e2e tests.
|
||||
E2E_STORAGE_TEST_ENVIRONMENT=${KUBE_E2E_STORAGE_TEST_ENVIRONMENT:-false}
|
||||
|
||||
# Optional: if set to true, a image puller is deployed. Only for use in e2e clusters.
|
||||
# TODO: Pipe this through GKE e2e clusters once we know it helps.
|
||||
PREPULL_E2E_IMAGES="${PREPULL_E2E_IMAGES:-true}"
|
||||
|
||||
# Evict pods whenever compute resource availability on the nodes gets below a threshold.
|
||||
EVICTION_HARD="${EVICTION_HARD:-memory.available<250Mi,nodefs.available<10%,nodefs.inodesFree<5%}"
|
||||
|
||||
# Optional: custom scheduling algorithm
|
||||
SCHEDULING_ALGORITHM_PROVIDER="${SCHEDULING_ALGORITHM_PROVIDER:-}"
|
||||
|
||||
# Optional: install a default StorageClass
|
||||
ENABLE_DEFAULT_STORAGE_CLASS="${ENABLE_DEFAULT_STORAGE_CLASS:-true}"
|
||||
|
||||
# TODO(dawn1107): Remove this once the flag is built into CVM image.
|
||||
# Kernel panic upon soft lockup issue
|
||||
SOFTLOCKUP_PANIC="${SOFTLOCKUP_PANIC:-true}" # true, false
|
||||
1123
vendor/k8s.io/kubernetes/cluster/gce/configure-vm.sh
generated
vendored
Executable file
1123
vendor/k8s.io/kubernetes/cluster/gce/configure-vm.sh
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
33
vendor/k8s.io/kubernetes/cluster/gce/coreos/configure-kubelet.sh
generated
vendored
Executable file
33
vendor/k8s.io/kubernetes/cluster/gce/coreos/configure-kubelet.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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 -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
MANIFESTS_DIR=/opt/kube-manifests/kubernetes
|
||||
|
||||
echo "Configuring hostname"
|
||||
hostnamectl set-hostname $(hostname | cut -f1 -d.)
|
||||
|
||||
echo "Configuring kubelet"
|
||||
mkdir -p /var/lib/kubelet
|
||||
mkdir -p /etc/kubernetes/manifests
|
||||
src=${MANIFESTS_DIR}/kubelet-config.yaml
|
||||
dst=/var/lib/kubelet/kubeconfig
|
||||
cp ${src} ${dst}
|
||||
sed -i 's/\"/\\\"/g' ${dst} # eval will remove the double quotes if they are not escaped
|
||||
eval "echo \"$(< ${dst})\"" > ${dst}
|
||||
352
vendor/k8s.io/kubernetes/cluster/gce/coreos/configure-node.sh
generated
vendored
Executable file
352
vendor/k8s.io/kubernetes/cluster/gce/coreos/configure-node.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,352 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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 -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
readonly KNOWN_TOKENS_FILE="/srv/salt-overlay/salt/kube-apiserver/known_tokens.csv"
|
||||
readonly BASIC_AUTH_FILE="/srv/salt-overlay/salt/kube-apiserver/basic_auth.csv"
|
||||
|
||||
# evaluate-manifest evalutes the source manifest with the environment variables.
|
||||
function evaluate-manifest() {
|
||||
local src=$1
|
||||
local dst=$2
|
||||
cp ${src} ${dst}
|
||||
sed -i 's/\"/\\\"/g' ${dst} # eval will remove the double quotes if they are not escaped
|
||||
eval "echo \"$(< ${dst})\"" > ${dst}
|
||||
}
|
||||
|
||||
# evaluate-manifests-dir evalutes the source manifests within $1 and put the result
|
||||
# in $2.
|
||||
function evaluate-manifests-dir() {
|
||||
local src=$1
|
||||
local dst=$2
|
||||
mkdir -p ${dst}
|
||||
|
||||
for f in ${src}/*
|
||||
do
|
||||
evaluate-manifest $f ${dst}/${f##*/}
|
||||
done
|
||||
}
|
||||
|
||||
function configure-kube-proxy() {
|
||||
echo "Configuring kube-proxy"
|
||||
mkdir -p /var/lib/kube-proxy
|
||||
evaluate-manifest ${MANIFESTS_DIR}/kubeproxy-config.yaml /var/lib/kube-proxy/kubeconfig
|
||||
}
|
||||
|
||||
function configure-logging() {
|
||||
if [[ "${LOGGING_DESTINATION}" == "gcp" ]];then
|
||||
echo "Configuring fluentd-gcp"
|
||||
# fluentd-gcp
|
||||
evaluate-manifest ${MANIFESTS_DIR}/fluentd-gcp.yaml /etc/kubernetes/manifests/fluentd-gcp.yaml
|
||||
elif [[ "${LOGGING_DESTINATION}" == "elasticsearch" ]];then
|
||||
echo "Configuring fluentd-es"
|
||||
# fluentd-es
|
||||
evaluate-manifest ${MANIFESTS_DIR}/fluentd-es.yaml /etc/kubernetes/manifests/fluentd-es.yaml
|
||||
fi
|
||||
}
|
||||
|
||||
function configure-admission-controls() {
|
||||
echo "Configuring admission controls"
|
||||
mkdir -p /etc/kubernetes/admission-controls
|
||||
cp -r ${SALT_DIR}/salt/kube-admission-controls/limit-range /etc/kubernetes/admission-controls/
|
||||
}
|
||||
|
||||
function configure-etcd() {
|
||||
echo "Configuring etcd"
|
||||
touch /var/log/etcd.log
|
||||
evaluate-manifest ${MANIFESTS_DIR}/etcd.yaml /etc/kubernetes/manifests/etcd.yaml
|
||||
}
|
||||
|
||||
function configure-etcd-events() {
|
||||
echo "Configuring etcd-events"
|
||||
touch /var/log/etcd-events.log
|
||||
evaluate-manifest ${MANIFESTS_DIR}/etcd-events.yaml /etc/kubernetes/manifests/etcd-events.yaml
|
||||
}
|
||||
|
||||
function configure-addon-manager() {
|
||||
echo "Configuring addon-manager"
|
||||
evaluate-manifest ${MANIFESTS_DIR}/kube-addon-manager.yaml /etc/kubernetes/manifests/kube-addon-manager.yaml
|
||||
}
|
||||
|
||||
function configure-kube-apiserver() {
|
||||
echo "Configuring kube-apiserver"
|
||||
|
||||
# Wait for etcd to be up.
|
||||
wait-url-up http://127.0.0.1:2379/version
|
||||
|
||||
touch /var/log/kube-apiserver.log
|
||||
|
||||
# Copying known_tokens and basic_auth file.
|
||||
cp ${SALT_OVERLAY}/salt/kube-apiserver/*.csv /srv/kubernetes/
|
||||
evaluate-manifest ${MANIFESTS_DIR}/kube-apiserver.yaml /etc/kubernetes/manifests/kube-apiserver.yaml
|
||||
}
|
||||
|
||||
function configure-kube-scheduler() {
|
||||
echo "Configuring kube-scheduler"
|
||||
touch /var/log/kube-scheduler.log
|
||||
evaluate-manifest ${MANIFESTS_DIR}/kube-scheduler.yaml /etc/kubernetes/manifests/kube-scheduler.yaml
|
||||
}
|
||||
|
||||
function configure-kube-controller-manager() {
|
||||
# Wait for api server.
|
||||
wait-url-up http://127.0.0.1:8080/version
|
||||
echo "Configuring kube-controller-manager"
|
||||
touch /var/log/kube-controller-manager.log
|
||||
evaluate-manifest ${MANIFESTS_DIR}/kube-controller-manager.yaml /etc/kubernetes/manifests/kube-controller-manager.yaml
|
||||
}
|
||||
|
||||
# Wait until $1 become reachable.
|
||||
function wait-url-up() {
|
||||
until curl --silent $1
|
||||
do
|
||||
sleep 5
|
||||
done
|
||||
}
|
||||
|
||||
# Configure addon yamls, and run salt/kube-addons/kube-addons.sh
|
||||
function configure-master-addons() {
|
||||
echo "Configuring master addons"
|
||||
|
||||
local addon_dir=/etc/kubernetes/addons
|
||||
mkdir -p ${addon_dir}
|
||||
|
||||
# Copy namespace.yaml
|
||||
evaluate-manifest ${MANIFESTS_DIR}/addons/namespace.yaml ${addon_dir}/namespace.yaml
|
||||
|
||||
if [[ "${ENABLE_L7_LOADBALANCING}" == "glbc" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/cluster-loadbalancing/glbc ${addon_dir}/cluster-loadbalancing/glbc
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_CLUSTER_DNS}" == "true" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/dns ${addon_dir}/dns
|
||||
if [[ "${ENABLE_DNS_HORIZONTAL_AUTOSCALER}" == "true" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/dns-horizontal-autoscaler ${addon_dir}/dns-horizontal-autoscaler
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_CLUSTER_UI}" == "true" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/dashboard ${addon_dir}/dashboard
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_CLUSTER_LOGGING}" == "true" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/fluentd-elasticsearch ${addon_dir}/fluentd-elasticsearch
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_CLUSTER_MONITORING}" == "influxdb" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/cluster-monitoring/influxdb ${addon_dir}/cluster-monitoring/influxdb
|
||||
elif [[ "${ENABLE_CLUSTER_MONITORING}" == "google" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/cluster-monitoring/google ${addon_dir}/cluster-monitoring/google
|
||||
elif [[ "${ENABLE_CLUSTER_MONITORING}" == "standalone" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/cluster-monitoring/standalone ${addon_dir}/cluster-monitoring/standalone
|
||||
elif [[ "${ENABLE_CLUSTER_MONITORING}" == "googleinfluxdb" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/cluster-monitoring/googleinfluxdb ${addon_dir}/cluster-monitoring/googleinfluxdb
|
||||
fi
|
||||
|
||||
# Note that, KUBE_ENABLE_INSECURE_REGISTRY is not supported yet.
|
||||
if [[ "${ENABLE_CLUSTER_REGISTRY}" == "true" ]]; then
|
||||
CLUSTER_REGISTRY_DISK_SIZE=$(convert-bytes-gce-kube "${CLUSTER_REGISTRY_DISK_SIZE}")
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/registry ${addon_dir}/registry
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_NODE_PROBLEM_DETECTOR}" == "true" ]]; then
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/node-problem-detector ${addon_dir}/node-problem-detector
|
||||
fi
|
||||
if [[ "${ENABLE_DEFAULT_STORAGE_CLASS:-}" == "true" ]]; then
|
||||
setup-addon-manifests "addons" "storage-class/gce"
|
||||
fi
|
||||
|
||||
evaluate-manifests-dir ${MANIFESTS_DIR}/addons/storage-class/gce ${addon_dir}/storage-class
|
||||
}
|
||||
|
||||
function configure-master-components() {
|
||||
configure-admission-controls
|
||||
configure-etcd
|
||||
configure-etcd-events
|
||||
configure-kube-apiserver
|
||||
configure-kube-scheduler
|
||||
configure-kube-controller-manager
|
||||
configure-master-addons
|
||||
configure-addon-manager
|
||||
}
|
||||
|
||||
# TODO(yifan): Merge this with mount-master-pd() in configure-vm.sh
|
||||
# Pass ${save_format_and_mount} as an argument.
|
||||
function mount-master-pd() {
|
||||
if [[ ! -e /dev/disk/by-id/google-master-pd ]]; then
|
||||
return
|
||||
fi
|
||||
device_info=$(ls -l /dev/disk/by-id/google-master-pd)
|
||||
relative_path=${device_info##* }
|
||||
device_path="/dev/disk/by-id/${relative_path}"
|
||||
|
||||
# Format and mount the disk, create directories on it for all of the master's
|
||||
# persistent data, and link them to where they're used.
|
||||
echo "Mounting master-pd"
|
||||
mkdir -p /mnt/master-pd
|
||||
safe_format_and_mount=${SALT_DIR}/salt/helpers/safe_format_and_mount
|
||||
chmod +x ${safe_format_and_mount}
|
||||
${safe_format_and_mount} -m "mkfs.ext4 -F" "${device_path}" /mnt/master-pd &>/var/log/master-pd-mount.log || \
|
||||
{ echo "!!! master-pd mount failed, review /var/log/master-pd-mount.log !!!"; return 1; }
|
||||
# Contains all the data stored in etcd
|
||||
mkdir -m 700 -p /mnt/master-pd/var/etcd
|
||||
# Contains the dynamically generated apiserver auth certs and keys
|
||||
mkdir -p /mnt/master-pd/srv/kubernetes
|
||||
# Contains the cluster's initial config parameters and auth tokens
|
||||
mkdir -p /mnt/master-pd/srv/salt-overlay
|
||||
# Directory for kube-apiserver to store SSH key (if necessary)
|
||||
mkdir -p /mnt/master-pd/srv/sshproxy
|
||||
|
||||
ln -s -f /mnt/master-pd/var/etcd /var/etcd
|
||||
ln -s -f /mnt/master-pd/srv/kubernetes /srv/kubernetes
|
||||
ln -s -f /mnt/master-pd/srv/sshproxy /srv/sshproxy
|
||||
ln -s -f /mnt/master-pd/srv/salt-overlay /srv/salt-overlay
|
||||
|
||||
# This is a bit of a hack to get around the fact that salt has to run after the
|
||||
# PD and mounted directory are already set up. We can't give ownership of the
|
||||
# directory to etcd until the etcd user and group exist, but they don't exist
|
||||
# until salt runs if we don't create them here. We could alternatively make the
|
||||
# permissions on the directory more permissive, but this seems less bad.
|
||||
if ! id etcd &>/dev/null; then
|
||||
useradd -s /sbin/nologin -d /var/etcd etcd
|
||||
fi
|
||||
chown -R etcd /mnt/master-pd/var/etcd
|
||||
chgrp -R etcd /mnt/master-pd/var/etcd
|
||||
}
|
||||
|
||||
# The job of this function is simple, but the basic regular expression syntax makes
|
||||
# this difficult to read. What we want to do is convert from [0-9]+B, KB, KiB, MB, etc
|
||||
# into [0-9]+, Ki, Mi, Gi, etc.
|
||||
# This is done in two steps:
|
||||
# 1. Convert from [0-9]+X?i?B into [0-9]X? (X denotes the prefix, ? means the field
|
||||
# is optional.
|
||||
# 2. Attach an 'i' to the end of the string if we find a letter.
|
||||
# The two step process is needed to handle the edge case in which we want to convert
|
||||
# a raw byte count, as the result should be a simple number (e.g. 5B -> 5).
|
||||
#
|
||||
# TODO(yifan): Reuse the one defined in configure-vm.sh to remove duplication.
|
||||
function convert-bytes-gce-kube() {
|
||||
local -r storage_space=$1
|
||||
echo "${storage_space}" | sed -e 's/^\([0-9]\+\)\([A-Z]\)\?i\?B$/\1\2/g' -e 's/\([A-Z]\)$/\1i/'
|
||||
}
|
||||
|
||||
# TODO(yifan): Use create-salt-master-auth() in configure-vm.sh
|
||||
function create-salt-master-auth() {
|
||||
if [[ ! -e /srv/kubernetes/ca.crt ]]; then
|
||||
if [[ ! -z "${CA_CERT:-}" ]] && [[ ! -z "${MASTER_CERT:-}" ]] && [[ ! -z "${MASTER_KEY:-}" ]]; then
|
||||
mkdir -p /srv/kubernetes
|
||||
(umask 077;
|
||||
echo "${CA_CERT}" | base64 --decode > /srv/kubernetes/ca.crt;
|
||||
echo "${MASTER_CERT}" | base64 --decode > /srv/kubernetes/server.cert;
|
||||
echo "${MASTER_KEY}" | base64 --decode > /srv/kubernetes/server.key;
|
||||
# Kubecfg cert/key are optional and included for backwards compatibility.
|
||||
# TODO(roberthbailey): Remove these two lines once GKE no longer requires
|
||||
# fetching clients certs from the master VM.
|
||||
echo "${KUBECFG_CERT:-}" | base64 --decode > /srv/kubernetes/kubecfg.crt;
|
||||
echo "${KUBECFG_KEY:-}" | base64 --decode > /srv/kubernetes/kubecfg.key)
|
||||
fi
|
||||
fi
|
||||
if [ ! -e "${BASIC_AUTH_FILE}" ]; then
|
||||
mkdir -p /srv/salt-overlay/salt/kube-apiserver
|
||||
(umask 077;
|
||||
echo "${KUBE_PASSWORD},${KUBE_USER},admin" > "${BASIC_AUTH_FILE}")
|
||||
fi
|
||||
if [ ! -e "${KNOWN_TOKENS_FILE}" ]; then
|
||||
mkdir -p /srv/salt-overlay/salt/kube-apiserver
|
||||
(umask 077;
|
||||
echo "${KUBE_BEARER_TOKEN},admin,admin" > "${KNOWN_TOKENS_FILE}";
|
||||
echo "${KUBELET_TOKEN},kubelet,kubelet" >> "${KNOWN_TOKENS_FILE}";
|
||||
echo "${KUBE_PROXY_TOKEN},kube_proxy,kube_proxy" >> "${KNOWN_TOKENS_FILE}")
|
||||
|
||||
# Generate tokens for other "service accounts". Append to known_tokens.
|
||||
#
|
||||
# NB: If this list ever changes, this script actually has to
|
||||
# change to detect the existence of this file, kill any deleted
|
||||
# old tokens and add any new tokens (to handle the upgrade case).
|
||||
local -r service_accounts=("system:scheduler" "system:controller_manager" "system:logging" "system:monitoring")
|
||||
for account in "${service_accounts[@]}"; do
|
||||
token=$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64 | tr -d "=+/" | dd bs=32 count=1 2>/dev/null)
|
||||
echo "${token},${account},${account}" >> "${KNOWN_TOKENS_FILE}"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# $1 is the directory containing all of the docker images
|
||||
function load-docker-images() {
|
||||
local success
|
||||
local restart_docker
|
||||
while true; do
|
||||
success=true
|
||||
restart_docker=false
|
||||
for image in "$1/"*; do
|
||||
timeout 30 docker load -i "${image}" &>/dev/null
|
||||
rc=$?
|
||||
if [[ "$rc" == 124 ]]; then
|
||||
restart_docker=true
|
||||
elif [[ "$rc" != 0 ]]; then
|
||||
success=false
|
||||
fi
|
||||
done
|
||||
if [[ "$success" == "true" ]]; then break; fi
|
||||
if [[ "$restart_docker" == "true" ]]; then systemctl restart docker; fi
|
||||
sleep 15
|
||||
done
|
||||
}
|
||||
|
||||
function load-master-components-images() {
|
||||
echo "Loading images for master components"
|
||||
export RKT_BIN=/opt/rkt/rkt
|
||||
export DOCKER2ACI_BIN=/opt/docker2aci/docker2aci
|
||||
${SALT_DIR}/install.sh ${KUBE_BIN_TAR}
|
||||
${SALT_DIR}/salt/kube-master-addons/kube-master-addons.sh
|
||||
|
||||
# Get the image tags.
|
||||
KUBE_APISERVER_DOCKER_TAG=$(cat ${KUBE_BIN_DIR}/kube-apiserver.docker_tag)
|
||||
KUBE_CONTROLLER_MANAGER_DOCKER_TAG=$(cat ${KUBE_BIN_DIR}/kube-controller-manager.docker_tag)
|
||||
KUBE_SCHEDULER_DOCKER_TAG=$(cat ${KUBE_BIN_DIR}/kube-scheduler.docker_tag)
|
||||
}
|
||||
|
||||
##########
|
||||
# main #
|
||||
##########
|
||||
|
||||
KUBE_BIN_TAR=/opt/downloads/kubernetes-server-linux-amd64.tar.gz
|
||||
KUBE_BIN_DIR=/opt/kubernetes/server/bin
|
||||
SALT_DIR=/opt/kubernetes/saltbase
|
||||
SALT_OVERLAY=/srv/salt-overlay
|
||||
MANIFESTS_DIR=/opt/kube-manifests/kubernetes
|
||||
|
||||
# On CoreOS, the hosts is in /usr/share/baselayout/hosts
|
||||
# So we need to manually populdate the hosts file here on gce.
|
||||
echo "127.0.0.1 localhost" >> /etc/hosts
|
||||
echo "::1 localhost" >> /etc/hosts
|
||||
|
||||
if [[ "${KUBERNETES_MASTER}" == "true" ]]; then
|
||||
mount-master-pd
|
||||
create-salt-master-auth
|
||||
load-master-components-images
|
||||
configure-master-components
|
||||
else
|
||||
configure-kube-proxy
|
||||
fi
|
||||
|
||||
if [[ "${ENABLE_NODE_LOGGING}" == "true" ]];then
|
||||
configure-logging
|
||||
fi
|
||||
|
||||
echo "Finish configuration successfully!"
|
||||
21
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-loadbalancing/glbc/default-svc.yaml
generated
vendored
Normal file
21
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-loadbalancing/glbc/default-svc.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
# This must match the --default-backend-service argument of the l7 lb
|
||||
# controller and is required because GCE mandates a default backend.
|
||||
name: default-http-backend
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: glbc
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "GLBCDefaultBackend"
|
||||
spec:
|
||||
# The default backend must be of type NodePort.
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8080
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
k8s-app: glbc
|
||||
69
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-loadbalancing/glbc/glbc-controller.yaml
generated
vendored
Normal file
69
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-loadbalancing/glbc/glbc-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: l7-lb-controller-v0.6.0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: glbc
|
||||
version: v0.6.0
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "GLBC"
|
||||
spec:
|
||||
# There should never be more than 1 controller alive simultaneously.
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: glbc
|
||||
version: v0.6.0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: glbc
|
||||
version: v0.6.0
|
||||
name: glbc
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 600
|
||||
containers:
|
||||
- name: default-http-backend
|
||||
# Any image is permissible as long as:
|
||||
# 1. It serves a 404 page at /
|
||||
# 2. It serves 200 on a /healthz endpoint
|
||||
image: gcr.io/google_containers/defaultbackend:1.0
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
resources:
|
||||
limits:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 20Mi
|
||||
- image: gcr.io/google_containers/glbc:0.6.0
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8081
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 30
|
||||
# healthz reaches out to GCE
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
name: l7-lb-controller
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
args:
|
||||
- --default-backend-service=kube-system/default-http-backend
|
||||
- --sync-period=60s
|
||||
- --cluster-uid=${KUBE_UID}
|
||||
127
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/google/heapster-controller.yaml
generated
vendored
Normal file
127
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/google/heapster-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: heapster-v1.1.0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
kubernetes.io/cluster-service: "true"
|
||||
version: v1.1.0
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/heapster:v1.2.0
|
||||
name: heapster
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
command:
|
||||
- /heapster
|
||||
- --source=kubernetes.summary_api:''
|
||||
- --sink=gcm
|
||||
volumeMounts:
|
||||
- name: ssl-certs
|
||||
mountPath: /etc/ssl/certs
|
||||
readOnly: true
|
||||
- name: usrsharecacerts
|
||||
mountPath: /usr/share/ca-certificates
|
||||
readOnly: true
|
||||
- image: gcr.io/google_containers/heapster:v1.2.0
|
||||
name: eventer
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
command:
|
||||
- /eventer
|
||||
- --source=kubernetes:''
|
||||
- --sink=gcl
|
||||
volumeMounts:
|
||||
- name: ssl-certs
|
||||
mountPath: /etc/ssl/certs
|
||||
readOnly: true
|
||||
- name: usrsharecacerts
|
||||
mountPath: /usr/share/ca-certificates
|
||||
readOnly: true
|
||||
- image: gcr.io/google_containers/addon-resizer:1.0
|
||||
name: heapster-nanny
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --cpu=100m
|
||||
- --extra-cpu=0m
|
||||
- --memory=300Mi
|
||||
- --extra-memory=4Mi
|
||||
- --threshold=5
|
||||
- --deployment=heapster-v1.1.0
|
||||
- --container=heapster
|
||||
- --poll-period=300000
|
||||
- image: gcr.io/google_containers/addon-resizer:1.0
|
||||
name: eventer-nanny
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --cpu=100m
|
||||
- --extra-cpu=0m
|
||||
- --memory=300Mi
|
||||
- --extra-memory=307200Ki
|
||||
- --threshold=5
|
||||
- --deployment=heapster-v1.1.0
|
||||
- --container=eventer
|
||||
- --poll-period=300000
|
||||
volumes:
|
||||
- name: ssl-certs
|
||||
hostPath:
|
||||
path: "/etc/ssl/certs"
|
||||
- name: usrsharecacerts
|
||||
hostPath:
|
||||
path: "/usr/share/ca-certificates"
|
||||
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/google/heapster-service.yaml
generated
vendored
Normal file
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/google/heapster-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: heapster
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "Heapster"
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8082
|
||||
selector:
|
||||
k8s-app: heapster
|
||||
128
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml
generated
vendored
Normal file
128
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/googleinfluxdb/heapster-controller-combined.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: heapster-v1.1.0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
kubernetes.io/cluster-service: "true"
|
||||
version: v1.1.0
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/heapster:v1.2.0
|
||||
name: heapster
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
command:
|
||||
- /heapster
|
||||
- --source=kubernetes.summary_api:''
|
||||
- --sink=influxdb:http://monitoring-influxdb:8086
|
||||
- --sink=gcm:?metrics=autoscaling
|
||||
volumeMounts:
|
||||
- name: ssl-certs
|
||||
mountPath: /etc/ssl/certs
|
||||
readOnly: true
|
||||
- name: usrsharecacerts
|
||||
mountPath: /usr/share/ca-certificates
|
||||
readOnly: true
|
||||
- image: gcr.io/google_containers/heapster:v1.2.0
|
||||
name: eventer
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
command:
|
||||
- /eventer
|
||||
- --source=kubernetes:''
|
||||
- --sink=gcl
|
||||
volumeMounts:
|
||||
- name: ssl-certs
|
||||
mountPath: /etc/ssl/certs
|
||||
readOnly: true
|
||||
- name: usrsharecacerts
|
||||
mountPath: /usr/share/ca-certificates
|
||||
readOnly: true
|
||||
- image: gcr.io/google_containers/addon-resizer:1.0
|
||||
name: heapster-nanny
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --cpu=100m
|
||||
- --extra-cpu=0m
|
||||
- --memory=300Mi
|
||||
- --extra-memory=4Mi
|
||||
- --threshold=5
|
||||
- --deployment=heapster-v1.1.0
|
||||
- --container=heapster
|
||||
- --poll-period=300000
|
||||
- image: gcr.io/google_containers/addon-resizer:1.0
|
||||
name: eventer-nanny
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --cpu=100m
|
||||
- --extra-cpu=0m
|
||||
- --memory=300Mi
|
||||
- --extra-memory=307200Ki
|
||||
- --threshold=5
|
||||
- --deployment=heapster-v1.1.0
|
||||
- --container=eventer
|
||||
- --poll-period=300000
|
||||
volumes:
|
||||
- name: ssl-certs
|
||||
hostPath:
|
||||
path: "/etc/ssl/certs"
|
||||
- name: usrsharecacerts
|
||||
hostPath:
|
||||
path: "/usr/share/ca-certificates"
|
||||
18
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/grafana-service.yaml
generated
vendored
Normal file
18
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/grafana-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: monitoring-grafana
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "Grafana"
|
||||
spec:
|
||||
# On production clusters, consider setting up auth for grafana, and
|
||||
# exposing Grafana either using a LoadBalancer or a public IP.
|
||||
# type: LoadBalancer
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 3000
|
||||
selector:
|
||||
k8s-app: influxGrafana
|
||||
|
||||
106
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/heapster-controller.yaml
generated
vendored
Normal file
106
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/heapster-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: heapster-v1.1.0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
kubernetes.io/cluster-service: "true"
|
||||
version: v1.1.0
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/heapster:v1.2.0
|
||||
name: heapster
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
command:
|
||||
- /heapster
|
||||
- --source=kubernetes.summary_api:''
|
||||
- --sink=influxdb:http://monitoring-influxdb:8086
|
||||
- image: gcr.io/google_containers/heapster:v1.2.0
|
||||
name: eventer
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
command:
|
||||
- /eventer
|
||||
- --source=kubernetes:''
|
||||
- --sink=influxdb:http://monitoring-influxdb:8086
|
||||
- image: gcr.io/google_containers/addon-resizer:1.0
|
||||
name: heapster-nanny
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --cpu=100m
|
||||
- --extra-cpu=0m
|
||||
- --memory=300Mi
|
||||
- --extra-memory=4Mi
|
||||
- --threshold=5
|
||||
- --deployment=heapster-v1.1.0
|
||||
- --container=heapster
|
||||
- --poll-period=300000
|
||||
- image: gcr.io/google_containers/addon-resizer:1.0
|
||||
name: eventer-nanny
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --cpu=100m
|
||||
- --extra-cpu=0m
|
||||
- --memory=300Mi
|
||||
- --extra-memory=307200Ki
|
||||
- --threshold=5
|
||||
- --deployment=heapster-v1.1.0
|
||||
- --container=eventer
|
||||
- --poll-period=300000
|
||||
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/heapster-service.yaml
generated
vendored
Normal file
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/heapster-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: heapster
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "Heapster"
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8082
|
||||
selector:
|
||||
k8s-app: heapster
|
||||
74
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml
generated
vendored
Normal file
74
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-grafana-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: monitoring-influxdb-grafana-v3
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: influxGrafana
|
||||
version: v3
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: influxGrafana
|
||||
version: v3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: influxGrafana
|
||||
version: v3
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/heapster_influxdb:v0.7
|
||||
name: influxdb
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 500Mi
|
||||
ports:
|
||||
- containerPort: 8083
|
||||
- containerPort: 8086
|
||||
volumeMounts:
|
||||
- name: influxdb-persistent-storage
|
||||
mountPath: /data
|
||||
- image: gcr.io/google_containers/heapster_grafana:v3.1.1
|
||||
name: grafana
|
||||
env:
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
env:
|
||||
# This variable is required to setup templates in Grafana.
|
||||
- name: INFLUXDB_SERVICE_URL
|
||||
value: http://monitoring-influxdb:8086
|
||||
# The following env variables are required to make Grafana accessible via
|
||||
# the kubernetes api-server proxy. On production clusters, we recommend
|
||||
# removing these env variables, setup auth for grafana, and expose the grafana
|
||||
# service using a LoadBalancer or a public IP.
|
||||
- name: GF_AUTH_BASIC_ENABLED
|
||||
value: "false"
|
||||
- name: GF_AUTH_ANONYMOUS_ENABLED
|
||||
value: "true"
|
||||
- name: GF_AUTH_ANONYMOUS_ORG_ROLE
|
||||
value: Admin
|
||||
- name: GF_SERVER_ROOT_URL
|
||||
value: /api/v1/proxy/namespaces/kube-system/services/monitoring-grafana/
|
||||
volumeMounts:
|
||||
- name: grafana-persistent-storage
|
||||
mountPath: /var
|
||||
volumes:
|
||||
- name: influxdb-persistent-storage
|
||||
emptyDir: {}
|
||||
- name: grafana-persistent-storage
|
||||
emptyDir: {}
|
||||
|
||||
19
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-service.yaml
generated
vendored
Normal file
19
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/influxdb/influxdb-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: monitoring-influxdb
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "InfluxDB"
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 8083
|
||||
targetPort: 8083
|
||||
- name: api
|
||||
port: 8086
|
||||
targetPort: 8086
|
||||
selector:
|
||||
k8s-app: influxGrafana
|
||||
|
||||
63
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/standalone/heapster-controller.yaml
generated
vendored
Normal file
63
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/standalone/heapster-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: heapster-v1.1.0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
kubernetes.io/cluster-service: "true"
|
||||
version: v1.1.0
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: heapster
|
||||
version: v1.1.0
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/heapster:v1.2.0
|
||||
name: heapster
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 300Mi
|
||||
command:
|
||||
- /heapster
|
||||
- --source=kubernetes.summary_api:''
|
||||
- image: gcr.io/google_containers/addon-resizer:1.0
|
||||
name: heapster-nanny
|
||||
resources:
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --cpu=100m
|
||||
- --extra-cpu=0m
|
||||
- --memory=300Mi
|
||||
- --extra-memory=4Mi
|
||||
- --threshold=5
|
||||
- --deployment=heapster-v1.1.0
|
||||
- --container=heapster
|
||||
- --poll-period=300000
|
||||
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/standalone/heapster-service.yaml
generated
vendored
Normal file
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/cluster-monitoring/standalone/heapster-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: heapster
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "Heapster"
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 8082
|
||||
selector:
|
||||
k8s-app: heapster
|
||||
40
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml
generated
vendored
Normal file
40
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# Keep this file in sync with addons/dashboard/dashboard-controller.yaml
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kubernetes-dashboard
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: kubernetes-dashboard
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kubernetes-dashboard
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
|
||||
spec:
|
||||
containers:
|
||||
- name: kubernetes-dashboard
|
||||
image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.5.0
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 50Mi
|
||||
ports:
|
||||
- containerPort: 9090
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 9090
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 30
|
||||
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-service.yaml
generated
vendored
Normal file
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dashboard/dashboard-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kubernetes-dashboard
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kubernetes-dashboard
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kubernetes-dashboard
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 9090
|
||||
145
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml
generated
vendored
Normal file
145
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dns/skydns-rc.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kube-dns
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
# replicas: not specified here:
|
||||
# 1. In order to make Addon Manager do not reconcile this replicas parameter.
|
||||
# 2. Default is 1.
|
||||
# 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on.
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 10%
|
||||
maxUnavailable: 0
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: kube-dns
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
annotations:
|
||||
scheduler.alpha.kubernetes.io/critical-pod: ''
|
||||
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
|
||||
spec:
|
||||
containers:
|
||||
- name: kubedns
|
||||
image: gcr.io/google_containers/kubedns-amd64:1.9
|
||||
resources:
|
||||
# TODO: Set memory limits when we've profiled the container for large
|
||||
# clusters, then set request = limit to keep this container in
|
||||
# guaranteed class. Currently, this container falls into the
|
||||
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
||||
limits:
|
||||
memory: 200Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz-kubedns
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readiness
|
||||
port: 8081
|
||||
scheme: HTTP
|
||||
# we poll on pod startup for the Kubernetes master service and
|
||||
# only setup the /readiness HTTP server once that's available.
|
||||
initialDelaySeconds: 3
|
||||
timeoutSeconds: 5
|
||||
args:
|
||||
# command = "/kube-dns"
|
||||
- --domain=${DNS_DOMAIN}.
|
||||
- --dns-port=10053
|
||||
- --config-map=kube-dns
|
||||
- --v=2
|
||||
env:
|
||||
- name: PROMETHEUS_PORT
|
||||
value: "10055"
|
||||
ports:
|
||||
- containerPort: 10053
|
||||
name: dns-local
|
||||
protocol: UDP
|
||||
- containerPort: 10053
|
||||
name: dns-tcp-local
|
||||
protocol: TCP
|
||||
- containerPort: 10055
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
- name: dnsmasq
|
||||
image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz-dnsmasq
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
args:
|
||||
- --cache-size=1000
|
||||
- --no-resolv
|
||||
- --server=127.0.0.1#10053
|
||||
- --log-facility=-
|
||||
ports:
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
protocol: UDP
|
||||
- containerPort: 53
|
||||
name: dns-tcp
|
||||
protocol: TCP
|
||||
- name: dnsmasq-metrics
|
||||
image: gcr.io/google_containers/dnsmasq-metrics-amd64:1.0
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /metrics
|
||||
port: 10054
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
successThreshold: 1
|
||||
failureThreshold: 5
|
||||
args:
|
||||
- --v=2
|
||||
- --logtostderr
|
||||
ports:
|
||||
- containerPort: 10054
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
memory: 10Mi
|
||||
- name: healthz
|
||||
image: gcr.io/google_containers/exechealthz-amd64:1.2
|
||||
resources:
|
||||
limits:
|
||||
memory: 50Mi
|
||||
requests:
|
||||
cpu: 10m
|
||||
# Note that this container shouldn't really need 50Mi of memory. The
|
||||
# limits are set higher than expected pending investigation on #29688.
|
||||
# The extra memory was stolen from the kubedns container to keep the
|
||||
# net memory requested by the pod constant.
|
||||
memory: 50Mi
|
||||
args:
|
||||
- --cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1 >/dev/null
|
||||
- --url=/healthz-dnsmasq
|
||||
- --cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1:10053 >/dev/null
|
||||
- --url=/healthz-kubedns
|
||||
- --port=8080
|
||||
- --quiet
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
dnsPolicy: Default # Don't use cluster DNS.
|
||||
20
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dns/skydns-svc.yaml
generated
vendored
Normal file
20
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/dns/skydns-svc.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kube-dns
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-dns
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "KubeDNS"
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kube-dns
|
||||
clusterIP: ${DNS_SERVER_IP}
|
||||
ports:
|
||||
- name: dns
|
||||
port: 53
|
||||
protocol: UDP
|
||||
- name: dns-tcp
|
||||
port: 53
|
||||
protocol: TCP
|
||||
43
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/es-controller.yaml
generated
vendored
Normal file
43
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/es-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: elasticsearch-logging-v1
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: elasticsearch-logging
|
||||
version: v1
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
k8s-app: elasticsearch-logging
|
||||
version: v1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: elasticsearch-logging
|
||||
version: v1
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/google_containers/elasticsearch:v2.4.1
|
||||
name: elasticsearch-logging
|
||||
resources:
|
||||
# need more cpu upon initialization, therefore burstable class
|
||||
limits:
|
||||
cpu: 1000m
|
||||
requests:
|
||||
cpu: 100m
|
||||
ports:
|
||||
- containerPort: 9200
|
||||
name: db
|
||||
protocol: TCP
|
||||
- containerPort: 9300
|
||||
name: transport
|
||||
protocol: TCP
|
||||
volumeMounts:
|
||||
- name: es-persistent-storage
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: es-persistent-storage
|
||||
emptyDir: {}
|
||||
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/es-service.yaml
generated
vendored
Normal file
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/es-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: elasticsearch-logging
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: elasticsearch-logging
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "Elasticsearch"
|
||||
spec:
|
||||
ports:
|
||||
- port: 9200
|
||||
protocol: TCP
|
||||
targetPort: db
|
||||
selector:
|
||||
k8s-app: elasticsearch-logging
|
||||
37
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/kibana-controller.yaml
generated
vendored
Normal file
37
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/kibana-controller.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: kibana-logging-v1
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kibana-logging
|
||||
version: v1
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: kibana-logging
|
||||
version: v1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kibana-logging
|
||||
version: v1
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: kibana-logging
|
||||
image: gcr.io/google_containers/kibana:v4.6.1
|
||||
resources:
|
||||
# keep request = limit to keep this container in guaranteed class
|
||||
limits:
|
||||
cpu: 100m
|
||||
requests:
|
||||
cpu: 100m
|
||||
env:
|
||||
- name: "ELASTICSEARCH_URL"
|
||||
value: "http://elasticsearch-logging:9200"
|
||||
ports:
|
||||
- containerPort: 5601
|
||||
name: ui
|
||||
protocol: TCP
|
||||
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/kibana-service.yaml
generated
vendored
Normal file
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/fluentd-elasticsearch/kibana-service.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kibana-logging
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kibana-logging
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "Kibana"
|
||||
spec:
|
||||
ports:
|
||||
- port: 5601
|
||||
protocol: TCP
|
||||
targetPort: ui
|
||||
selector:
|
||||
k8s-app: kibana-logging
|
||||
4
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/namespace.yaml
generated
vendored
Normal file
4
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/namespace.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: kube-system
|
||||
44
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/node-problem-detector/node-problem-detector.yaml
generated
vendored
Normal file
44
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/node-problem-detector/node-problem-detector.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: node-problem-detector-v0.1
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: node-problem-detector
|
||||
version: v0.1
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: node-problem-detector
|
||||
version: v0.1
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: node-problem-detector
|
||||
image: gcr.io/google_containers/node-problem-detector:v0.1
|
||||
env:
|
||||
# Config the host ip and port of apiserver.
|
||||
- name: "KUBERNETES_SERVICE_HOST"
|
||||
value: ${INSTANCE_PREFIX}-master
|
||||
- name: "KUBERNETES_SERVICE_PORT"
|
||||
value: "443"
|
||||
securityContext:
|
||||
privileged: true
|
||||
resources:
|
||||
limits:
|
||||
cpu: "200m"
|
||||
memory: "100Mi"
|
||||
requests:
|
||||
cpu: "20m"
|
||||
memory: "20Mi"
|
||||
volumeMounts:
|
||||
- name: log
|
||||
mountPath: /log
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: log
|
||||
hostPath:
|
||||
path: /var/log/
|
||||
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-pv.yaml
generated
vendored
Normal file
14
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-pv.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
kind: PersistentVolume
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: kube-system-kube-registry-pv
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
capacity:
|
||||
storage: ${CLUSTER_REGISTRY_DISK_SIZE}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
gcePersistentDisk:
|
||||
pdName: ${CLUSTER_REGISTRY_DISK}
|
||||
fsType: "ext4"
|
||||
13
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-pvc.yaml
generated
vendored
Normal file
13
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-pvc.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: kube-registry-pvc
|
||||
namespace: kube-system
|
||||
labels:
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: ${CLUSTER_REGISTRY_DISK_SIZE}
|
||||
44
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-rc.yaml
generated
vendored
Normal file
44
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-rc.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
metadata:
|
||||
name: kube-registry-v0
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-registry
|
||||
version: v0
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
k8s-app: kube-registry
|
||||
version: v0
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: kube-registry
|
||||
version: v0
|
||||
kubernetes.io/cluster-service: "true"
|
||||
spec:
|
||||
containers:
|
||||
- name: registry
|
||||
image: registry:2
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: REGISTRY_HTTP_ADDR
|
||||
value: :5000
|
||||
- name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
|
||||
value: /var/lib/registry
|
||||
volumeMounts:
|
||||
- name: image-store
|
||||
mountPath: /var/lib/registry
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
name: registry
|
||||
protocol: TCP
|
||||
volumes:
|
||||
- name: image-store
|
||||
persistentVolumeClaim:
|
||||
claimName: kube-registry-pvc
|
||||
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-svc.yaml
generated
vendored
Normal file
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/addons/registry/registry-svc.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kube-registry
|
||||
namespace: kube-system
|
||||
labels:
|
||||
k8s-app: kube-registry
|
||||
kubernetes.io/cluster-service: "true"
|
||||
kubernetes.io/name: "KubeRegistry"
|
||||
spec:
|
||||
selector:
|
||||
k8s-app: kube-registry
|
||||
ports:
|
||||
- name: registry
|
||||
port: 5000
|
||||
protocol: TCP
|
||||
58
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/etcd-events.yaml
generated
vendored
Normal file
58
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/etcd-events.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: etcd-server-events
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/etcd
|
||||
--listen-peer-urls=http://127.0.0.1:2381
|
||||
--advertise-client-urls=http://127.0.0.1:4002
|
||||
--listen-client-urls=http://127.0.0.1:4002
|
||||
--data-dir=/var/etcd/data-events
|
||||
1>>/var/log/etcd-events.log 2>&1
|
||||
image: gcr.io/google_containers/etcd:2.2.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /health
|
||||
port: 4002
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
name: etcd-container
|
||||
ports:
|
||||
- containerPort: 2381
|
||||
hostPort: 2381
|
||||
name: serverport
|
||||
protocol: TCP
|
||||
- containerPort: 4002
|
||||
hostPort: 4002
|
||||
name: clientport
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
requests:
|
||||
cpu: 100m
|
||||
volumeMounts:
|
||||
- mountPath: /var/etcd
|
||||
name: varetcd
|
||||
- mountPath: /var/log/etcd-events.log
|
||||
name: varlogetcd
|
||||
dnsPolicy: ClusterFirst
|
||||
hostNetwork: true
|
||||
nodeName: ${INSTANCE_PREFIX}-master
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /mnt/master-pd/var/etcd
|
||||
name: varetcd
|
||||
- hostPath:
|
||||
path: /var/log/etcd-events.log
|
||||
name: varlogetcd
|
||||
55
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/etcd.yaml
generated
vendored
Normal file
55
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/etcd.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: etcd-server
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/etcd
|
||||
--listen-peer-urls=http://127.0.0.1:2380
|
||||
--advertise-client-urls=http://127.0.0.1:2379
|
||||
--listen-client-urls=http://127.0.0.1:2379
|
||||
--data-dir=/var/etcd/data
|
||||
1>>/var/log/etcd.log 2>&1
|
||||
image: gcr.io/google_containers/etcd:2.2.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /health
|
||||
port: 2379
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
name: etcd-container
|
||||
ports:
|
||||
- containerPort: 2380
|
||||
hostPort: 2380
|
||||
name: serverport
|
||||
protocol: TCP
|
||||
- containerPort: 2379
|
||||
hostPort: 2379
|
||||
name: clientport
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 200m
|
||||
volumeMounts:
|
||||
- mountPath: /var/etcd
|
||||
name: varetcd
|
||||
- mountPath: /var/log/etcd.log
|
||||
name: varlogetcd
|
||||
dnsPolicy: ClusterFirst
|
||||
hostNetwork: true
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /mnt/master-pd/var/etcd
|
||||
name: varetcd
|
||||
- hostPath:
|
||||
path: /var/log/etcd.log
|
||||
name: varlogetcd
|
||||
25
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-addon-manager.yaml
generated
vendored
Normal file
25
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-addon-manager.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: kube-addon-manager
|
||||
namespace: kube-system
|
||||
version: v1
|
||||
spec:
|
||||
hostNetwork: true
|
||||
containers:
|
||||
- name: kube-addon-manager
|
||||
image: gcr.io/google-containers/kube-addon-manager:v1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 5m
|
||||
# TODO(yifan): Figure out what's the memory usage should be here.
|
||||
# See https://github.com/kubernetes/kubernetes/issues/23641.
|
||||
memory: 100Mi
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes/
|
||||
name: addons
|
||||
readOnly: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/
|
||||
name: addons
|
||||
83
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-apiserver.yaml
generated
vendored
Normal file
83
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-apiserver.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: kube-apiserver
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/kube-apiserver
|
||||
--address=127.0.0.1
|
||||
--etcd-servers=http://127.0.0.1:2379
|
||||
--etcd-servers-overrides=/events#http://127.0.0.1:4002
|
||||
--cloud-provider=gce
|
||||
--admission-control=${ADMISSION_CONTROL}
|
||||
--service-cluster-ip-range=${SERVICE_CLUSTER_IP_RANGE}
|
||||
--client-ca-file=/srv/kubernetes/ca.crt
|
||||
--basic-auth-file=/srv/kubernetes/basic_auth.csv
|
||||
--tls-cert-file=/srv/kubernetes/server.cert
|
||||
--tls-private-key-file=/srv/kubernetes/server.key
|
||||
--secure-port=443
|
||||
--token-auth-file=/srv/kubernetes/known_tokens.csv
|
||||
--v=2
|
||||
--allow-privileged=True
|
||||
1>>/var/log/kube-apiserver.log 2>&1
|
||||
image: gcr.io/google_containers/kube-apiserver:${KUBE_APISERVER_DOCKER_TAG}
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
name: kube-apiserver
|
||||
ports:
|
||||
- containerPort: 443
|
||||
hostPort: 443
|
||||
name: https
|
||||
protocol: TCP
|
||||
- containerPort: 8080
|
||||
hostPort: 8080
|
||||
name: local
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
volumeMounts:
|
||||
- mountPath: /srv/kubernetes
|
||||
name: srvkube
|
||||
readOnly: true
|
||||
- mountPath: /var/log/kube-apiserver.log
|
||||
name: logfile
|
||||
- mountPath: /etc/ssl
|
||||
name: etcssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/share/ca-certificates
|
||||
name: usrsharecacerts
|
||||
readOnly: true
|
||||
- mountPath: /srv/sshproxy
|
||||
name: srvsshproxy
|
||||
dnsPolicy: ClusterFirst
|
||||
hostNetwork: true
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /srv/kubernetes
|
||||
name: srvkube
|
||||
- hostPath:
|
||||
path: /var/log/kube-apiserver.log
|
||||
name: logfile
|
||||
- hostPath:
|
||||
path: /etc/ssl
|
||||
name: etcssl
|
||||
- hostPath:
|
||||
path: /usr/share/ca-certificates
|
||||
name: usrsharecacerts
|
||||
- hostPath:
|
||||
path: /srv/sshproxy
|
||||
name: srvsshproxy
|
||||
66
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-controller-manager.yaml
generated
vendored
Normal file
66
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-controller-manager.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: kube-controller-manager
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/kube-controller-manager
|
||||
--master=127.0.0.1:8080
|
||||
--cluster-name=${INSTANCE_PREFIX}
|
||||
--cluster-cidr=${CLUSTER_IP_RANGE}
|
||||
--service-cluster-ip-range="${SERVICE_CLUSTER_IP_RANGE}"
|
||||
--allocate-node-cidrs=true
|
||||
--cloud-provider=gce
|
||||
--service-account-private-key-file=/srv/kubernetes/server.key
|
||||
--v=2
|
||||
--root-ca-file=/srv/kubernetes/ca.crt
|
||||
1>>/var/log/kube-controller-manager.log 2>&1
|
||||
image: gcr.io/google_containers/kube-controller-manager:${KUBE_CONTROLLER_MANAGER_DOCKER_TAG}
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /healthz
|
||||
port: 10252
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
name: kube-controller-manager
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
requests:
|
||||
cpu: 200m
|
||||
volumeMounts:
|
||||
- mountPath: /srv/kubernetes
|
||||
name: srvkube
|
||||
readOnly: true
|
||||
- mountPath: /var/log/kube-controller-manager.log
|
||||
name: logfile
|
||||
- mountPath: /etc/ssl
|
||||
name: etcssl
|
||||
readOnly: true
|
||||
- mountPath: /usr/share/ca-certificates
|
||||
name: usrsharecacerts
|
||||
readOnly: true
|
||||
dnsPolicy: ClusterFirst
|
||||
hostNetwork: true
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /srv/kubernetes
|
||||
name: srvkube
|
||||
- hostPath:
|
||||
path: /var/log/kube-controller-manager.log
|
||||
name: logfile
|
||||
- hostPath:
|
||||
path: /etc/ssl
|
||||
name: etcssl
|
||||
- hostPath:
|
||||
path: /usr/share/ca-certificates
|
||||
name: usrsharecacerts
|
||||
40
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-scheduler.yaml
generated
vendored
Normal file
40
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-scheduler.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: kube-scheduler
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- /usr/local/bin/kube-scheduler
|
||||
--master=127.0.0.1:8080
|
||||
--v=2
|
||||
1>>/var/log/kube-scheduler.log 2>&1
|
||||
image: gcr.io/google_containers/kube-scheduler:${KUBE_SCHEDULER_DOCKER_TAG}
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
host: 127.0.0.1
|
||||
path: /healthz
|
||||
port: 10251
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
timeoutSeconds: 15
|
||||
name: kube-scheduler
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
volumeMounts:
|
||||
- mountPath: /var/log/kube-scheduler.log
|
||||
name: logfile
|
||||
dnsPolicy: ClusterFirst
|
||||
hostNetwork: true
|
||||
nodeName: ${INSTANCE_PREFIX}-master
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /var/log/kube-scheduler.log
|
||||
name: logfile
|
||||
7
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-system.json
generated
vendored
Normal file
7
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kube-system.json
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"apiVersion": "v1",
|
||||
"kind": "Namespace",
|
||||
"metadata": {
|
||||
"name": "kube-system"
|
||||
}
|
||||
}
|
||||
17
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kubelet-config.yaml
generated
vendored
Normal file
17
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kubelet-config.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
apiVersion: v1
|
||||
kind: Config
|
||||
users:
|
||||
- name: kubelet
|
||||
user:
|
||||
client-certificate-data: ${KUBELET_CERT}
|
||||
client-key-data: ${KUBELET_KEY}
|
||||
clusters:
|
||||
- name: local
|
||||
cluster:
|
||||
certificate-authority-data: ${CA_CERT}
|
||||
contexts:
|
||||
- context:
|
||||
cluster: local
|
||||
user: kubelet
|
||||
name: service-account-context
|
||||
current-context: service-account-context
|
||||
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kubeproxy-config.yaml
generated
vendored
Normal file
16
vendor/k8s.io/kubernetes/cluster/gce/coreos/kube-manifests/kubeproxy-config.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
apiVersion: v1
|
||||
kind: Config
|
||||
users:
|
||||
- name: kube-proxy
|
||||
user:
|
||||
token: ${KUBE_PROXY_TOKEN}
|
||||
clusters:
|
||||
- name: local
|
||||
cluster:
|
||||
certificate-authority-data: ${CA_CERT}
|
||||
contexts:
|
||||
- context:
|
||||
cluster: local
|
||||
user: kube-proxy
|
||||
name: service-account-context
|
||||
current-context: service-account-context
|
||||
168
vendor/k8s.io/kubernetes/cluster/gce/coreos/master-docker.yaml
generated
vendored
Normal file
168
vendor/k8s.io/kubernetes/cluster/gce/coreos/master-docker.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
#cloud-config
|
||||
|
||||
coreos:
|
||||
update:
|
||||
reboot-strategy: off
|
||||
units:
|
||||
- name: locksmithd.service
|
||||
mask: true
|
||||
- name: kube-env.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Fetch kubernetes-node-environment
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /etc/kube-env.yaml \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
|
||||
# Transform the yaml to env file.
|
||||
ExecStartPre=/usr/bin/mv /etc/kube-env.yaml /etc/kube-env
|
||||
ExecStart=/usr/bin/sed -i "s/: '/=/;s/'$//" /etc/kube-env
|
||||
|
||||
- name: kubernetes-install-cni.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download cni
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-07a8a28637e97b22eb8dfe710eeae1344f69d16e.tar.gz
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||
|
||||
- name: kubernetes-download-salt.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download salt
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-salt.tar.gz ${SALT_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-salt.tar.gz -C /opt --overwrite
|
||||
|
||||
- name: kubernetes-download-manifests.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download manifests
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-manifests.tar.gz ${KUBE_MANIFESTS_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/kube-manifests
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-manifests.tar.gz -C /opt/kube-manifests --overwrite
|
||||
|
||||
- name: kubernetes-install-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Install Kubernetes Server
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-server-linux-amd64.tar.gz ${SERVER_BINARY_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-server-linux-amd64.tar.gz -C /opt --overwrite
|
||||
|
||||
- name: kubelet.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Run Kubelet service
|
||||
Requires=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service
|
||||
After=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-kubelet.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-kubelet
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-kubelet.sh
|
||||
ExecStartPre=/run/configure-kubelet.sh
|
||||
ExecStart=/opt/kubernetes/server/bin/kubelet \
|
||||
--api-servers=https://${INSTANCE_PREFIX}-master \
|
||||
--enable-debugging-handlers=false \
|
||||
--cloud-provider=gce \
|
||||
--config=/etc/kubernetes/manifests \
|
||||
--allow-privileged=true \
|
||||
--v=2 \
|
||||
--cluster-dns=${DNS_SERVER_IP} \
|
||||
--cluster-domain=${DNS_DOMAIN} \
|
||||
--logtostderr=true \
|
||||
--container-runtime=docker \
|
||||
--pod-cidr=${MASTER_IP_RANGE} \
|
||||
--register-schedulable=false
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
KillMode=process
|
||||
|
||||
- name: docker.service
|
||||
drop-ins:
|
||||
- name: 50-docker-opts.conf
|
||||
content: |
|
||||
[Service]
|
||||
Environment='DOCKER_OPTS=--bridge=cbr0 --iptables=false --ip-masq=false'
|
||||
MountFlags=slave
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=1048576
|
||||
LimitCORE=infinity
|
||||
Restart=always
|
||||
RestartSec=2s
|
||||
StartLimitInterval=0
|
||||
|
||||
- name: kubernetes-configure-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Configure Node For Kubernetes service
|
||||
Requires=kubernetes-install-node.service
|
||||
After=kubernetes-install-node.service
|
||||
Requires=kubernetes-download-salt.service
|
||||
After=kubernetes-download-salt.service
|
||||
Requires=kubernetes-download-manifests.service
|
||||
After=kubernetes-download-manifests.service
|
||||
# Need the kubelet/docker running because we will use docker load for docker images.
|
||||
Requires=kubelet.service
|
||||
After=kubelet.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-node.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-node
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-node.sh
|
||||
ExecStart=/run/configure-node.sh
|
||||
58
vendor/k8s.io/kubernetes/cluster/gce/coreos/master-helper.sh
generated
vendored
Executable file
58
vendor/k8s.io/kubernetes/cluster/gce/coreos/master-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A library of helper functions and constant for coreos os distro
|
||||
|
||||
# create-master-instance creates the master instance. If called with
|
||||
# an argument, the argument is used as the name to a reserved IP
|
||||
# address for the master. (In the case of upgrade/repair, we re-use
|
||||
# the same IP.)
|
||||
#
|
||||
# It requires a whole slew of assumed variables, partially due to to
|
||||
# the call to write-master-env. Listing them would be rather
|
||||
# futile. Instead, we list the required calls to ensure any additional
|
||||
# variables are set:
|
||||
# ensure-temp-dir
|
||||
# detect-project
|
||||
# get-bearer-token
|
||||
#
|
||||
function create-master-instance() {
|
||||
local address_opt=""
|
||||
[[ -n ${1:-} ]] && address_opt="--address ${1}"
|
||||
|
||||
local preemptible_master=""
|
||||
if [[ "${PREEMPTIBLE_MASTER:-}" == "true" ]]; then
|
||||
preemptible_master="--preemptible --maintenance-policy TERMINATE"
|
||||
fi
|
||||
|
||||
write-master-env
|
||||
gcloud compute instances create "${MASTER_NAME}" \
|
||||
${address_opt} \
|
||||
--project "${PROJECT}" \
|
||||
--zone "${ZONE}" \
|
||||
--machine-type "${MASTER_SIZE}" \
|
||||
--image-project="${MASTER_IMAGE_PROJECT}" \
|
||||
--image "${MASTER_IMAGE}" \
|
||||
--tags "${MASTER_TAG}" \
|
||||
--network "${NETWORK}" \
|
||||
--scopes "storage-ro,compute-rw,monitoring,logging-write" \
|
||||
--can-ip-forward \
|
||||
--metadata-from-file \
|
||||
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/coreos/master-${CONTAINER_RUNTIME}.yaml,configure-node=${KUBE_ROOT}/cluster/gce/coreos/configure-node.sh,configure-kubelet=${KUBE_ROOT}/cluster/gce/coreos/configure-kubelet.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt" \
|
||||
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
|
||||
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}" \
|
||||
${preemptible_master}
|
||||
}
|
||||
220
vendor/k8s.io/kubernetes/cluster/gce/coreos/master-rkt.yaml
generated
vendored
Normal file
220
vendor/k8s.io/kubernetes/cluster/gce/coreos/master-rkt.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
#cloud-config
|
||||
|
||||
coreos:
|
||||
update:
|
||||
reboot-strategy: off
|
||||
units:
|
||||
- name: locksmithd.service
|
||||
mask: true
|
||||
- name: kube-env.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Fetch kubernetes-node-environment
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /etc/kube-env.yaml \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
|
||||
# Transform the yaml to env file.
|
||||
ExecStartPre=/usr/bin/mv /etc/kube-env.yaml /etc/kube-env
|
||||
ExecStart=/usr/bin/sed -i "s/: '/=/;s/'$//" /etc/kube-env
|
||||
|
||||
- name: kubernetes-install-cni.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download cni
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-07a8a28637e97b22eb8dfe710eeae1344f69d16e.tar.gz
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||
|
||||
- name: kubernetes-install-docker2aci.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download docker2aci
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/docker2aci
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/docker2aci.tar.gz https://github.com/appc/docker2aci/releases/download/v0.11.1/docker2aci-v0.11.1.tar.gz
|
||||
ExecStart=/usr/bin/tar --strip-components=1 -xf /opt/downloads/docker2aci.tar.gz -C /opt/docker2aci/ --overwrite
|
||||
|
||||
- name: kubernetes-install-rkt.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Fetch rkt
|
||||
Documentation=http://github.com/coreos/rkt
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /etc/rkt /opt/downloads /opt/rkt/
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --location --create-dirs --output /opt/downloads/rkt.tar.gz https://github.com/coreos/rkt/releases/download/v${RKT_VERSION}/rkt-v${RKT_VERSION}.tar.gz
|
||||
ExecStart=/usr/bin/tar --strip-components=1 -xf /opt/downloads/rkt.tar.gz -C /opt/rkt/ --overwrite
|
||||
|
||||
- name: kubernetes-load-rkt-stage1.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Load rkt stage1 images
|
||||
Documentation=http://github.com/coreos/rkt
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kubernetes-install-rkt.service
|
||||
After=kubernetes-install-rkt.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/opt/rkt/rkt fetch /opt/rkt/stage1-coreos.aci /opt/rkt/stage1-kvm.aci /opt/rkt/stage1-fly.aci --insecure-options=image
|
||||
|
||||
- name: kubernetes-download-salt.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download salt
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-salt.tar.gz ${SALT_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-salt.tar.gz -C /opt --overwrite
|
||||
|
||||
- name: kubernetes-download-manifests.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download manifests
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-manifests.tar.gz ${KUBE_MANIFESTS_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/kube-manifests
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-manifests.tar.gz -C /opt/kube-manifests --overwrite
|
||||
|
||||
- name: kubernetes-install-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Install Kubernetes Server
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-server-linux-amd64.tar.gz ${SERVER_BINARY_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-server-linux-amd64.tar.gz -C /opt --overwrite
|
||||
|
||||
- name: rkt-api-service.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Start rkt API service as Daemon
|
||||
Requires=kubernetes-install-rkt.service
|
||||
After=kubernetes-install-rkt.service
|
||||
[Service]
|
||||
ExecStart=/opt/rkt/rkt api-service
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
- name: kubelet.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Run Kubelet service
|
||||
Requires=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service kubernetes-load-rkt-stage1.service
|
||||
After=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service kubernetes-load-rkt-stage1.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-kubelet.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-kubelet
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-kubelet.sh
|
||||
ExecStartPre=/run/configure-kubelet.sh
|
||||
ExecStart=/opt/kubernetes/server/bin/kubelet \
|
||||
--api-servers=https://${INSTANCE_PREFIX}-master \
|
||||
--enable-debugging-handlers=false \
|
||||
--cloud-provider=gce \
|
||||
--config=/etc/kubernetes/manifests \
|
||||
--allow-privileged=true \
|
||||
--v=2 \
|
||||
--cluster-dns=${DNS_SERVER_IP} \
|
||||
--cluster-domain=${DNS_DOMAIN} \
|
||||
--logtostderr=true \
|
||||
--container-runtime=rkt \
|
||||
--rkt-path=/opt/rkt/rkt \
|
||||
--rkt-stage1-image=${RKT_STAGE_IMAGE} \
|
||||
--pod-cidr=${MASTER_IP_RANGE} \
|
||||
--register-schedulable=false
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
KillMode=process
|
||||
|
||||
- name: docker.service
|
||||
command: stop
|
||||
|
||||
- name: kubernetes-configure-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Configure Node For Kubernetes service
|
||||
Requires=kubernetes-install-node.service
|
||||
After=kubernetes-install-node.service
|
||||
Requires=kubernetes-install-rkt.service
|
||||
After=kubernetes-install-rkt.service
|
||||
Requires=kubernetes-download-salt.service
|
||||
After=kubernetes-download-salt.service
|
||||
Requires=kubernetes-download-manifests.service
|
||||
After=kubernetes-download-manifests.service
|
||||
Requires=kubernetes-install-docker2aci.service
|
||||
After=kubernetes-install-docker2aci.service
|
||||
Requires=kubelet.service
|
||||
After=kubelet.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-node.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-node
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-node.sh
|
||||
ExecStart=/run/configure-node.sh
|
||||
159
vendor/k8s.io/kubernetes/cluster/gce/coreos/node-docker.yaml
generated
vendored
Normal file
159
vendor/k8s.io/kubernetes/cluster/gce/coreos/node-docker.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
#cloud-config
|
||||
|
||||
coreos:
|
||||
update:
|
||||
reboot-strategy: off
|
||||
units:
|
||||
- name: locksmithd.service
|
||||
mask: true
|
||||
- name: kube-env.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Fetch kubernetes-node-environment
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /etc/kube-env.yaml \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
|
||||
# Transform the yaml to env file.
|
||||
ExecStartPre=/usr/bin/mv /etc/kube-env.yaml /etc/kube-env
|
||||
ExecStart=/usr/bin/sed -i "s/: '/=/;s/'$//" /etc/kube-env
|
||||
|
||||
- name: kubernetes-install-cni.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download cni
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-07a8a28637e97b22eb8dfe710eeae1344f69d16e.tar.gz
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||
|
||||
- name: kubernetes-download-manifests.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download manifests
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-manifests.tar.gz ${KUBE_MANIFESTS_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/kube-manifests
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-manifests.tar.gz -C /opt/kube-manifests --overwrite
|
||||
|
||||
- name: kubernetes-install-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Install Kubernetes Server
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/kubernetes/pkg
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/kubernetes/pkg/kubernetes-server-linux-amd64.tar.gz ${SERVER_BINARY_TAR_URL}
|
||||
ExecStart=/usr/bin/tar xf /opt/kubernetes/pkg/kubernetes-server-linux-amd64.tar.gz -C /opt --overwrite
|
||||
|
||||
- name: kubelet.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Run Kubelet service
|
||||
Requires=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service
|
||||
After=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-kubelet.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-kubelet
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-kubelet.sh
|
||||
ExecStartPre=/run/configure-kubelet.sh
|
||||
ExecStart=/opt/kubernetes/server/bin/kubelet \
|
||||
--api-servers=https://${INSTANCE_PREFIX}-master \
|
||||
--enable-debugging-handlers=true \
|
||||
--cloud-provider=gce \
|
||||
--config=/etc/kubernetes/manifests \
|
||||
--allow-privileged=true \
|
||||
--v=2 \
|
||||
--cluster-dns=${DNS_SERVER_IP} \
|
||||
--cluster-domain=${DNS_DOMAIN} \
|
||||
--logtostderr=true \
|
||||
--container-runtime=docker \
|
||||
--network-plugin=${NETWORK_PROVIDER}
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
KillMode=process
|
||||
|
||||
- name: kube-proxy.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Start Kube-proxy service as Daemon
|
||||
Requires=kubernetes-configure-node.service
|
||||
After=kubernetes-configure-node.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStart=/opt/kubernetes/server/bin/kube-proxy \
|
||||
--master=https://${KUBERNETES_MASTER_NAME} \
|
||||
--kubeconfig=/var/lib/kube-proxy/kubeconfig \
|
||||
--v=2 \
|
||||
--logtostderr=true
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
- name: docker.service
|
||||
drop-ins:
|
||||
- name: 50-docker-opts.conf
|
||||
content: |
|
||||
[Service]
|
||||
Environment='DOCKER_OPTS= --iptables=false --ip-masq=false'
|
||||
MountFlags=slave
|
||||
LimitNOFILE=1048576
|
||||
LimitNPROC=1048576
|
||||
LimitCORE=infinity
|
||||
Restart=always
|
||||
RestartSec=2s
|
||||
StartLimitInterval=0
|
||||
|
||||
- name: kubernetes-configure-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Configure Node For Kubernetes service
|
||||
Requires=kubernetes-install-node.service
|
||||
After=kubernetes-install-node.service
|
||||
Requires=kubernetes-download-manifests.service
|
||||
After=kubernetes-download-manifests.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-node.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-node
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-node.sh
|
||||
ExecStart=/run/configure-node.sh
|
||||
28
vendor/k8s.io/kubernetes/cluster/gce/coreos/node-helper.sh
generated
vendored
Executable file
28
vendor/k8s.io/kubernetes/cluster/gce/coreos/node-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A library of helper functions and constant for coreos os distro
|
||||
|
||||
# $1: template name (required)
|
||||
function create-node-instance-template() {
|
||||
local template_name="$1"
|
||||
create-node-template "$template_name" "${scope_flags}" \
|
||||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \
|
||||
"user-data=${KUBE_ROOT}/cluster/gce/coreos/node-${CONTAINER_RUNTIME}.yaml" \
|
||||
"configure-node=${KUBE_ROOT}/cluster/gce/coreos/configure-node.sh" \
|
||||
"configure-kubelet=${KUBE_ROOT}/cluster/gce/coreos/configure-kubelet.sh" \
|
||||
"cluster-name=${KUBE_TEMP}/cluster-name.txt"
|
||||
}
|
||||
196
vendor/k8s.io/kubernetes/cluster/gce/coreos/node-rkt.yaml
generated
vendored
Normal file
196
vendor/k8s.io/kubernetes/cluster/gce/coreos/node-rkt.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
#cloud-config
|
||||
|
||||
coreos:
|
||||
update:
|
||||
reboot-strategy: off
|
||||
units:
|
||||
- name: locksmithd.service
|
||||
mask: true
|
||||
- name: kube-env.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Fetch kubernetes-node-environment
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /etc/kube-env.yaml \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
|
||||
# Transform the yaml to env file.
|
||||
ExecStartPre=/usr/bin/mv /etc/kube-env.yaml /etc/kube-env
|
||||
ExecStart=/usr/bin/sed -i "s/: '/=/;s/'$//" /etc/kube-env
|
||||
|
||||
- name: kubernetes-install-cni.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download cni
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/cni
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output /opt/downloads/cni.tar.gz https://storage.googleapis.com/kubernetes-release/network-plugins/cni-07a8a28637e97b22eb8dfe710eeae1344f69d16e.tar.gz
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/cni.tar.gz -C /opt/cni/
|
||||
|
||||
- name: kubernetes-install-rkt.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Fetch rkt
|
||||
Documentation=http://github.com/coreos/rkt
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /etc/rkt /opt/downloads /opt/rkt/
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --location --create-dirs --output /opt/downloads/rkt.tar.gz https://github.com/coreos/rkt/releases/download/v${RKT_VERSION}/rkt-v${RKT_VERSION}.tar.gz
|
||||
ExecStart=/usr/bin/tar --strip-components=1 -xf /opt/downloads/rkt.tar.gz -C /opt/rkt/ --overwrite
|
||||
|
||||
- name: kubernetes-load-rkt-stage1.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Load rkt stage1 images
|
||||
Documentation=http://github.com/coreos/rkt
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kubernetes-install-rkt.service
|
||||
After=kubernetes-install-rkt.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/opt/rkt/rkt fetch /opt/rkt/stage1-coreos.aci /opt/rkt/stage1-kvm.aci /opt/rkt/stage1-fly.aci --insecure-options=image
|
||||
|
||||
- name: kubernetes-download-manifests.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download manifests
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/downloads
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/downloads/kubernetes-manifests.tar.gz ${KUBE_MANIFESTS_TAR_URL}
|
||||
# TODO(yifan): Check hash.
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/kube-manifests
|
||||
ExecStart=/usr/bin/tar xf /opt/downloads/kubernetes-manifests.tar.gz -C /opt/kube-manifests --overwrite
|
||||
|
||||
- name: kubernetes-install-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Install Kubernetes Server
|
||||
Requires=network-online.target
|
||||
After=network-online.target
|
||||
Requires=kube-env.service
|
||||
After=kube-env.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/mkdir -p /opt/kubernetes/pkg
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error --location --create-dirs --output \
|
||||
/opt/kubernetes/pkg/kubernetes-server-linux-amd64.tar.gz ${SERVER_BINARY_TAR_URL}
|
||||
ExecStart=/usr/bin/tar xf /opt/kubernetes/pkg/kubernetes-server-linux-amd64.tar.gz -C /opt --overwrite
|
||||
|
||||
- name: rkt-api-service.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Start rkt API service as Daemon
|
||||
Requires=kubernetes-install-rkt.service
|
||||
After=kubernetes-install-rkt.service
|
||||
[Service]
|
||||
ExecStart=/opt/rkt/rkt api-service
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
- name: kubelet.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Run Kubelet service
|
||||
Requires=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service kubernetes-load-rkt-stage1.service
|
||||
After=network-online.target kube-env.service kubernetes-download-manifests.service kubernetes-install-cni.service kubernetes-load-rkt-stage1.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-kubelet.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-kubelet
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-kubelet.sh
|
||||
ExecStartPre=/run/configure-kubelet.sh
|
||||
ExecStart=/opt/kubernetes/server/bin/kubelet \
|
||||
--api-servers=https://${INSTANCE_PREFIX}-master \
|
||||
--enable-debugging-handlers=true \
|
||||
--cloud-provider=gce \
|
||||
--config=/etc/kubernetes/manifests \
|
||||
--allow-privileged=true \
|
||||
--v=2 \
|
||||
--cluster-dns=${DNS_SERVER_IP} \
|
||||
--cluster-domain=${DNS_DOMAIN} \
|
||||
--logtostderr=true \
|
||||
--container-runtime=rkt \
|
||||
--rkt-path=/opt/rkt/rkt \
|
||||
--rkt-stage1-image=${RKT_STAGE1_IMAGE} \
|
||||
--network-plugin=kubenet
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
KillMode=process
|
||||
|
||||
- name: kube-proxy.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Start Kube-proxy service as Daemon
|
||||
Requires=kubernetes-configure-node.service
|
||||
After=kubernetes-configure-node.service
|
||||
[Service]
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStart=/opt/kubernetes/server/bin/kube-proxy \
|
||||
--master=https://${KUBERNETES_MASTER_NAME} \
|
||||
--kubeconfig=/var/lib/kube-proxy/kubeconfig \
|
||||
--v=2 \
|
||||
--logtostderr=true
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
- name: docker.service
|
||||
command: stop
|
||||
|
||||
- name: kubernetes-configure-node.service
|
||||
command: start
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Configure Node For Kubernetes service
|
||||
Requires=kubernetes-install-node.service
|
||||
After=kubernetes-install-node.service
|
||||
Requires=kubernetes-install-rkt.service
|
||||
After=kubernetes-install-rkt.service
|
||||
Requires=kubernetes-download-manifests.service
|
||||
After=kubernetes-download-manifests.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
EnvironmentFile=/etc/kube-env
|
||||
ExecStartPre=/usr/bin/curl --fail --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /run/configure-node.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-node
|
||||
ExecStartPre=/usr/bin/chmod 0755 /run/configure-node.sh
|
||||
ExecStart=/run/configure-node.sh
|
||||
105
vendor/k8s.io/kubernetes/cluster/gce/debian/master-helper.sh
generated
vendored
Executable file
105
vendor/k8s.io/kubernetes/cluster/gce/debian/master-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,105 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A library of helper functions and constant for debian os distro
|
||||
|
||||
|
||||
# create-master-instance creates the master instance. If called with
|
||||
# an argument, the argument is used as the name to a reserved IP
|
||||
# address for the master. (In the case of upgrade/repair, we re-use
|
||||
# the same IP.)
|
||||
#
|
||||
# It requires a whole slew of assumed variables, partially due to to
|
||||
# the call to write-master-env. Listing them would be rather
|
||||
# futile. Instead, we list the required calls to ensure any additional
|
||||
# variables are set:
|
||||
# ensure-temp-dir
|
||||
# detect-project
|
||||
# get-bearer-token
|
||||
#
|
||||
function create-master-instance {
|
||||
local address_opt=""
|
||||
[[ -n ${1:-} ]] && address_opt="--address ${1}"
|
||||
local preemptible_master=""
|
||||
if [[ "${PREEMPTIBLE_MASTER:-}" == "true" ]]; then
|
||||
preemptible_master="--preemptible --maintenance-policy TERMINATE"
|
||||
fi
|
||||
|
||||
write-master-env
|
||||
prepare-startup-script
|
||||
create-master-instance-internal "${MASTER_NAME}" "${address_opt}" "${preemptible_master}"
|
||||
}
|
||||
|
||||
function replicate-master-instance() {
|
||||
local existing_master_zone="${1}"
|
||||
local existing_master_name="${2}"
|
||||
local existing_master_replicas="${3}"
|
||||
|
||||
local kube_env="$(get-metadata "${existing_master_zone}" "${existing_master_name}" kube-env)"
|
||||
# Substitute INITIAL_ETCD_CLUSTER to enable etcd clustering.
|
||||
kube_env="$(echo "${kube_env}" | grep -v "INITIAL_ETCD_CLUSTER")"
|
||||
kube_env="$(echo -e "${kube_env}\nINITIAL_ETCD_CLUSTER: '${existing_master_replicas},${REPLICA_NAME}'")"
|
||||
|
||||
ETCD_CA_KEY="$(echo "${kube_env}" | grep "ETCD_CA_KEY" | sed "s/^.*: '//" | sed "s/'$//")"
|
||||
ETCD_CA_CERT="$(echo "${kube_env}" | grep "ETCD_CA_CERT" | sed "s/^.*: '//" | sed "s/'$//")"
|
||||
|
||||
create-etcd-certs "${REPLICA_NAME}" "${ETCD_CA_CERT}" "${ETCD_CA_KEY}"
|
||||
|
||||
kube_env="$(echo "${kube_env}" | grep -v "ETCD_PEER_KEY")"
|
||||
kube_env="$(echo -e "${kube_env}\nETCD_PEER_KEY: '${ETCD_PEER_KEY_BASE64}'")"
|
||||
kube_env="$(echo "${kube_env}" | grep -v "ETCD_PEER_CERT")"
|
||||
kube_env="$(echo -e "${kube_env}\nETCD_PEER_CERT: '${ETCD_PEER_CERT_BASE64}'")"
|
||||
|
||||
echo "${kube_env}" > ${KUBE_TEMP}/master-kube-env.yaml
|
||||
get-metadata "${existing_master_zone}" "${existing_master_name}" cluster-name > ${KUBE_TEMP}/cluster-name.txt
|
||||
get-metadata "${existing_master_zone}" "${existing_master_name}" startup-script > ${KUBE_TEMP}/configure-vm.sh
|
||||
|
||||
create-master-instance-internal "${REPLICA_NAME}"
|
||||
}
|
||||
|
||||
function create-master-instance-internal() {
|
||||
local -r master_name="${1}"
|
||||
local -r address_option="${2:-}"
|
||||
local -r preemptible_master="${3:-}"
|
||||
|
||||
gcloud compute instances create "${master_name}" \
|
||||
${address_option} \
|
||||
--project "${PROJECT}" \
|
||||
--zone "${ZONE}" \
|
||||
--machine-type "${MASTER_SIZE}" \
|
||||
--image-project="${MASTER_IMAGE_PROJECT}" \
|
||||
--image "${MASTER_IMAGE}" \
|
||||
--tags "${MASTER_TAG}" \
|
||||
--network "${NETWORK}" \
|
||||
--scopes "storage-ro,compute-rw,monitoring,logging-write" \
|
||||
--can-ip-forward \
|
||||
--metadata-from-file \
|
||||
"startup-script=${KUBE_TEMP}/configure-vm.sh,kube-env=${KUBE_TEMP}/master-kube-env.yaml,cluster-name=${KUBE_TEMP}/cluster-name.txt" \
|
||||
--disk "name=${master_name}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
|
||||
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}" \
|
||||
${preemptible_master}
|
||||
}
|
||||
|
||||
# TODO: This is most likely not the best way to read metadata from the existing master.
|
||||
function get-metadata() {
|
||||
local zone="${1}"
|
||||
local name="${2}"
|
||||
local key="${3}"
|
||||
gcloud compute ssh "${name}" \
|
||||
--project "${PROJECT}" \
|
||||
--zone="${zone}" \
|
||||
--command "curl \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/${key}\" -H \"Metadata-Flavor: Google\"" 2>/dev/null
|
||||
}
|
||||
27
vendor/k8s.io/kubernetes/cluster/gce/debian/node-helper.sh
generated
vendored
Executable file
27
vendor/k8s.io/kubernetes/cluster/gce/debian/node-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A library of helper functions and constant for debian os distro
|
||||
|
||||
# $1: template name (required)
|
||||
function create-node-instance-template {
|
||||
local template_name="$1"
|
||||
prepare-startup-script
|
||||
create-node-template "$template_name" "${scope_flags}" \
|
||||
"startup-script=${KUBE_TEMP}/configure-vm.sh" \
|
||||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \
|
||||
"cluster-name=${KUBE_TEMP}/cluster-name.txt"
|
||||
}
|
||||
35
vendor/k8s.io/kubernetes/cluster/gce/delete-stranded-load-balancers.sh
generated
vendored
Executable file
35
vendor/k8s.io/kubernetes/cluster/gce/delete-stranded-load-balancers.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A utility for deleting target pools and forwarding rules that are unattached to VMs
|
||||
PROJECT=${PROJECT:-kubernetes-jenkins}
|
||||
REGION=${REGION:-us-central1}
|
||||
|
||||
LIST=$(gcloud --project=${PROJECT} compute target-pools list --format='value(name)')
|
||||
|
||||
result=0
|
||||
for x in ${LIST}; do
|
||||
if ! gcloud compute --project=${PROJECT} target-pools get-health "${x}" --region=${REGION} 2>/dev/null >/dev/null; then
|
||||
echo DELETING "${x}"
|
||||
gcloud compute --project=${PROJECT} firewall-rules delete "k8s-fw-${x}" -q
|
||||
gcloud compute --project=${PROJECT} forwarding-rules delete "${x}" --region=${REGION} -q
|
||||
gcloud compute --project=${PROJECT} addresses delete "${x}" --region=${REGION} -q
|
||||
gcloud compute --project=${PROJECT} target-pools delete "${x}" --region=${REGION} -q
|
||||
result=1
|
||||
fi
|
||||
done
|
||||
exit ${result}
|
||||
|
||||
11
vendor/k8s.io/kubernetes/cluster/gce/gci/README.md
generated
vendored
Normal file
11
vendor/k8s.io/kubernetes/cluster/gce/gci/README.md
generated
vendored
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Container-VM Image
|
||||
|
||||
[Container-VM Image](https://cloud.google.com/compute/docs/containers/vm-image/)
|
||||
is a container-optimized OS image for the Google Cloud Platform (GCP). It is
|
||||
primarily for running Google services on GCP. Unlike the open preview version
|
||||
of container-vm, the new Container-VM Image is based on the open source
|
||||
ChromiumOS project, allowing us greater control over the build management,
|
||||
security compliance, and customizations for GCP.
|
||||
|
||||
|
||||
[]()
|
||||
1288
vendor/k8s.io/kubernetes/cluster/gce/gci/configure-helper.sh
generated
vendored
Normal file
1288
vendor/k8s.io/kubernetes/cluster/gce/gci/configure-helper.sh
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
213
vendor/k8s.io/kubernetes/cluster/gce/gci/configure.sh
generated
vendored
Normal file
213
vendor/k8s.io/kubernetes/cluster/gce/gci/configure.sh
generated
vendored
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
#!/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.
|
||||
|
||||
# Due to the GCE custom metadata size limit, we split the entire script into two
|
||||
# files configure.sh and configure-helper.sh. The functionality of downloading
|
||||
# kubernetes configuration, manifests, docker images, and binary files are
|
||||
# put in configure.sh, which is uploaded via GCE custom metadata.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
function set-broken-motd {
|
||||
cat > /etc/motd <<EOF
|
||||
Broken (or in progress) Kubernetes node setup! Check the cluster initialization status
|
||||
using the following commands.
|
||||
|
||||
Master instance:
|
||||
- sudo systemctl status kube-master-installation
|
||||
- sudo systemctl status kube-master-configuration
|
||||
|
||||
Node instance:
|
||||
- sudo systemctl status kube-node-installation
|
||||
- sudo systemctl status kube-node-configuration
|
||||
EOF
|
||||
}
|
||||
|
||||
function download-kube-env {
|
||||
# Fetch kube-env from GCE metadata server.
|
||||
local -r tmp_kube_env="/tmp/kube-env.yaml"
|
||||
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o "${tmp_kube_env}" \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
|
||||
# Convert the yaml format file into a shell-style file.
|
||||
eval $(python -c '''
|
||||
import pipes,sys,yaml
|
||||
for k,v in yaml.load(sys.stdin).iteritems():
|
||||
print("readonly {var}={value}".format(var = k, value = pipes.quote(str(v))))
|
||||
''' < "${tmp_kube_env}" > "${KUBE_HOME}/kube-env")
|
||||
rm -f "${tmp_kube_env}"
|
||||
}
|
||||
|
||||
function validate-hash {
|
||||
local -r file="$1"
|
||||
local -r expected="$2"
|
||||
|
||||
actual=$(sha1sum ${file} | awk '{ print $1 }') || true
|
||||
if [[ "${actual}" != "${expected}" ]]; then
|
||||
echo "== ${file} corrupted, sha1 ${actual} doesn't match expected ${expected} =="
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Retry a download until we get it. Takes a hash and a set of URLs.
|
||||
#
|
||||
# $1 is the sha1 of the URL. Can be "" if the sha1 is unknown.
|
||||
# $2+ are the URLs to download.
|
||||
function download-or-bust {
|
||||
local -r hash="$1"
|
||||
shift 1
|
||||
|
||||
local -r urls=( $* )
|
||||
while true; do
|
||||
for url in "${urls[@]}"; do
|
||||
local file="${url##*/}"
|
||||
rm -f "${file}"
|
||||
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --max-time 300 --retry 6 --retry-delay 10 "${url}"; then
|
||||
echo "== Failed to download ${url}. Retrying. =="
|
||||
elif [[ -n "${hash}" ]] && ! validate-hash "${file}" "${hash}"; then
|
||||
echo "== Hash validation of ${url} failed. Retrying. =="
|
||||
else
|
||||
if [[ -n "${hash}" ]]; then
|
||||
echo "== Downloaded ${url} (SHA1 = ${hash}) =="
|
||||
else
|
||||
echo "== Downloaded ${url} =="
|
||||
fi
|
||||
return
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
function split-commas {
|
||||
echo $1 | tr "," "\n"
|
||||
}
|
||||
|
||||
function install-gci-mounter-tools {
|
||||
local -r rkt_version="v1.18.0"
|
||||
local -r gci_mounter_version="v2"
|
||||
local -r rkt_binary_sha1="75fc8f29c79bc9e505f3e7f6e8fadf2425c21967"
|
||||
local -r rkt_stage1_fly_sha1="474df5a1f934960ba669b360ab713d0a54283091"
|
||||
local -r gci_mounter_sha1="851e841d8640d6a05e64e22c493f5ac3c4cba561"
|
||||
download-or-bust "${rkt_binary_sha1}" "https://storage.googleapis.com/kubernetes-release/rkt/${rkt_version}/rkt"
|
||||
download-or-bust "${rkt_stage1_fly_sha1}" "https://storage.googleapis.com/kubernetes-release/rkt/${rkt_version}/stage1-fly.aci"
|
||||
download-or-bust "${gci_mounter_sha1}" "https://storage.googleapis.com/kubernetes-release/gci-mounter/gci-mounter-${gci_mounter_version}.aci"
|
||||
local -r rkt_dst="${KUBE_HOME}/bin/"
|
||||
mv "${KUBE_HOME}/rkt" "${rkt_dst}/rkt"
|
||||
mv "${KUBE_HOME}/stage1-fly.aci" "${rkt_dst}/stage1-fly.aci"
|
||||
mv "${KUBE_HOME}/gci-mounter-${gci_mounter_version}.aci" "${rkt_dst}/gci-mounter-${gci_mounter_version}.aci"
|
||||
chmod a+x "${rkt_dst}/rkt"
|
||||
}
|
||||
|
||||
# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,
|
||||
# and places them into suitable directories. Files are placed in /home/kubernetes.
|
||||
function install-kube-binary-config {
|
||||
cd "${KUBE_HOME}"
|
||||
local -r server_binary_tar_urls=( $(split-commas "${SERVER_BINARY_TAR_URL}") )
|
||||
local -r server_binary_tar="${server_binary_tar_urls[0]##*/}"
|
||||
if [[ -n "${SERVER_BINARY_TAR_HASH:-}" ]]; then
|
||||
local -r server_binary_tar_hash="${SERVER_BINARY_TAR_HASH}"
|
||||
else
|
||||
echo "Downloading binary release sha1 (not found in env)"
|
||||
download-or-bust "" "${server_binary_tar_urls[@]/.tar.gz/.tar.gz.sha1}"
|
||||
local -r server_binary_tar_hash=$(cat "${server_binary_tar}.sha1")
|
||||
fi
|
||||
echo "Downloading binary release tar"
|
||||
download-or-bust "${server_binary_tar_hash}" "${server_binary_tar_urls[@]}"
|
||||
tar xzf "${KUBE_HOME}/${server_binary_tar}" -C "${KUBE_HOME}" --overwrite
|
||||
# Copy docker_tag and image files to ${KUBE_HOME}/kube-docker-files.
|
||||
src_dir="${KUBE_HOME}/kubernetes/server/bin"
|
||||
dst_dir="${KUBE_HOME}/kube-docker-files"
|
||||
mkdir -p "${dst_dir}"
|
||||
cp "${src_dir}/"*.docker_tag "${dst_dir}"
|
||||
if [[ "${KUBERNETES_MASTER:-}" == "false" ]]; then
|
||||
cp "${src_dir}/kube-proxy.tar" "${dst_dir}"
|
||||
else
|
||||
cp "${src_dir}/kube-apiserver.tar" "${dst_dir}"
|
||||
cp "${src_dir}/kube-controller-manager.tar" "${dst_dir}"
|
||||
cp "${src_dir}/kube-scheduler.tar" "${dst_dir}"
|
||||
cp -r "${KUBE_HOME}/kubernetes/addons" "${dst_dir}"
|
||||
fi
|
||||
local -r kube_bin="${KUBE_HOME}/bin"
|
||||
mv "${src_dir}/kubelet" "${kube_bin}"
|
||||
mv "${src_dir}/kubectl" "${kube_bin}"
|
||||
|
||||
if [[ "${NETWORK_PROVIDER:-}" == "kubenet" ]] || \
|
||||
[[ "${NETWORK_PROVIDER:-}" == "cni" ]]; then
|
||||
#TODO(andyzheng0831): We should make the cni version number as a k8s env variable.
|
||||
local -r cni_tar="cni-07a8a28637e97b22eb8dfe710eeae1344f69d16e.tar.gz"
|
||||
local -r cni_sha1="19d49f7b2b99cd2493d5ae0ace896c64e289ccbb"
|
||||
download-or-bust "${cni_sha1}" "https://storage.googleapis.com/kubernetes-release/network-plugins/${cni_tar}"
|
||||
local -r cni_dir="${KUBE_HOME}/cni"
|
||||
mkdir -p "${cni_dir}"
|
||||
tar xzf "${KUBE_HOME}/${cni_tar}" -C "${cni_dir}" --overwrite
|
||||
mv "${cni_dir}/bin"/* "${kube_bin}"
|
||||
rmdir "${cni_dir}/bin"
|
||||
rm -f "${KUBE_HOME}/${cni_tar}"
|
||||
fi
|
||||
|
||||
mv "${KUBE_HOME}/kubernetes/LICENSES" "${KUBE_HOME}"
|
||||
mv "${KUBE_HOME}/kubernetes/kubernetes-src.tar.gz" "${KUBE_HOME}"
|
||||
|
||||
# Put kube-system pods manifests in ${KUBE_HOME}/kube-manifests/.
|
||||
dst_dir="${KUBE_HOME}/kube-manifests"
|
||||
mkdir -p "${dst_dir}"
|
||||
local -r manifests_tar_urls=( $(split-commas "${KUBE_MANIFESTS_TAR_URL}") )
|
||||
local -r manifests_tar="${manifests_tar_urls[0]##*/}"
|
||||
if [ -n "${KUBE_MANIFESTS_TAR_HASH:-}" ]; then
|
||||
local -r manifests_tar_hash="${KUBE_MANIFESTS_TAR_HASH}"
|
||||
else
|
||||
echo "Downloading k8s manifests sha1 (not found in env)"
|
||||
download-or-bust "" "${manifests_tar_urls[@]/.tar.gz/.tar.gz.sha1}"
|
||||
local -r manifests_tar_hash=$(cat "${manifests_tar}.sha1")
|
||||
fi
|
||||
echo "Downloading k8s manifests tar"
|
||||
download-or-bust "${manifests_tar_hash}" "${manifests_tar_urls[@]}"
|
||||
tar xzf "${KUBE_HOME}/${manifests_tar}" -C "${dst_dir}" --overwrite
|
||||
local -r kube_addon_registry="${KUBE_ADDON_REGISTRY:-gcr.io/google_containers}"
|
||||
if [[ "${kube_addon_registry}" != "gcr.io/google_containers" ]]; then
|
||||
find "${dst_dir}" -name \*.yaml -or -name \*.yaml.in | \
|
||||
xargs sed -ri "s@(image:\s.*)gcr.io/google_containers@\1${kube_addon_registry}@"
|
||||
find "${dst_dir}" -name \*.manifest -or -name \*.json | \
|
||||
xargs sed -ri "s@(image\":\s+\")gcr.io/google_containers@\1${kube_addon_registry}@"
|
||||
fi
|
||||
cp "${dst_dir}/kubernetes/gci-trusty/gci-configure-helper.sh" "${KUBE_HOME}/bin/configure-helper.sh"
|
||||
cp "${dst_dir}/kubernetes/gci-trusty/gci-mounter" "${KUBE_HOME}/bin/mounter"
|
||||
cp "${dst_dir}/kubernetes/gci-trusty/health-monitor.sh" "${KUBE_HOME}/bin/health-monitor.sh"
|
||||
chmod -R 755 "${kube_bin}"
|
||||
|
||||
# Install gci mounter related artifacts to allow mounting storage volumes in GCI
|
||||
install-gci-mounter-tools
|
||||
|
||||
# Clean up.
|
||||
rm -rf "${KUBE_HOME}/kubernetes"
|
||||
rm -f "${KUBE_HOME}/${server_binary_tar}"
|
||||
rm -f "${KUBE_HOME}/${server_binary_tar}.sha1"
|
||||
rm -f "${KUBE_HOME}/${manifests_tar}"
|
||||
rm -f "${KUBE_HOME}/${manifests_tar}.sha1"
|
||||
}
|
||||
|
||||
|
||||
######### Main Function ##########
|
||||
echo "Start to install kubernetes files"
|
||||
set-broken-motd
|
||||
KUBE_HOME="/home/kubernetes"
|
||||
download-kube-env
|
||||
source "${KUBE_HOME}/kube-env"
|
||||
install-kube-binary-config
|
||||
echo "Done for installing kubernetes files"
|
||||
81
vendor/k8s.io/kubernetes/cluster/gce/gci/health-monitor.sh
generated
vendored
Normal file
81
vendor/k8s.io/kubernetes/cluster/gce/gci/health-monitor.sh
generated
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
#!/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 script is for master and node instance health monitoring, which is
|
||||
# packed in kube-manifest tarball. It is executed through a systemd service
|
||||
# in cluster/gce/gci/<master/node>.yaml. The env variables come from an env
|
||||
# file provided by the systemd service.
|
||||
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
# We simply kill the process when there is a failure. Another systemd service will
|
||||
# automatically restart the process.
|
||||
function docker_monitoring {
|
||||
while [ 1 ]; do
|
||||
if ! timeout 10 docker ps > /dev/null; then
|
||||
echo "Docker daemon failed!"
|
||||
pkill docker
|
||||
# Wait for a while, as we don't want to kill it again before it is really up.
|
||||
sleep 30
|
||||
else
|
||||
sleep "${SLEEP_SECONDS}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
function kubelet_monitoring {
|
||||
echo "Wait for 2 minutes for kubelet to be fuctional"
|
||||
# TODO(andyzheng0831): replace it with a more reliable method if possible.
|
||||
sleep 120
|
||||
local -r max_seconds=10
|
||||
while [ 1 ]; do
|
||||
if ! curl --insecure -m "${max_seconds}" -f -s https://127.0.0.1:${KUBELET_PORT:-10250}/healthz > /dev/null; then
|
||||
echo "Kubelet is unhealthy!"
|
||||
curl --insecure https://127.0.0.1:${KUBELET_PORT:-10250}/healthz
|
||||
pkill kubelet
|
||||
# Wait for a while, as we don't want to kill it again before it is really up.
|
||||
sleep 60
|
||||
else
|
||||
sleep "${SLEEP_SECONDS}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
############## Main Function ################
|
||||
if [[ "$#" -ne 1 ]]; then
|
||||
echo "Usage: health-monitor.sh <docker/kubelet>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
KUBE_ENV="/home/kubernetes/kube-env"
|
||||
if [[ ! -e "${KUBE_ENV}" ]]; then
|
||||
echo "The ${KUBE_ENV} file does not exist!! Terminate health monitoring"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SLEEP_SECONDS=10
|
||||
component=$1
|
||||
echo "Start kubernetes health monitoring for ${component}"
|
||||
source "${KUBE_ENV}"
|
||||
if [[ "${component}" == "docker" ]]; then
|
||||
docker_monitoring
|
||||
elif [[ "${component}" == "kubelet" ]]; then
|
||||
kubelet_monitoring
|
||||
else
|
||||
echo "Health monitoring for component "${component}" is not supported!"
|
||||
fi
|
||||
38
vendor/k8s.io/kubernetes/cluster/gce/gci/helper.sh
generated
vendored
Executable file
38
vendor/k8s.io/kubernetes/cluster/gce/gci/helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/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.
|
||||
|
||||
# A library of helper functions and constant for GCI distro
|
||||
|
||||
# Creates the GCI specific metadata files if they do not exit.
|
||||
# Assumed var
|
||||
# KUBE_TEMP
|
||||
function ensure-gci-metadata-files {
|
||||
if [[ ! -f "${KUBE_TEMP}/gci-update.txt" ]]; then
|
||||
cat >"${KUBE_TEMP}/gci-update.txt" << EOF
|
||||
update_disabled
|
||||
EOF
|
||||
fi
|
||||
if [[ ! -f "${KUBE_TEMP}/gci-ensure-gke-docker.txt" ]]; then
|
||||
cat >"${KUBE_TEMP}/gci-ensure-gke-docker.txt" << EOF
|
||||
true
|
||||
EOF
|
||||
fi
|
||||
if [[ ! -f "${KUBE_TEMP}/gci-docker-version.txt" ]]; then
|
||||
cat >"${KUBE_TEMP}/gci-docker-version.txt" << EOF
|
||||
${GCI_DOCKER_VERSION:-}
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
100
vendor/k8s.io/kubernetes/cluster/gce/gci/master-helper.sh
generated
vendored
Executable file
100
vendor/k8s.io/kubernetes/cluster/gce/gci/master-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,100 @@
|
|||
#!/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.
|
||||
|
||||
# A library of helper functions and constant for GCI distro
|
||||
|
||||
source "${KUBE_ROOT}/cluster/gce/gci/helper.sh"
|
||||
|
||||
# create-master-instance creates the master instance. If called with
|
||||
# an argument, the argument is used as the name to a reserved IP
|
||||
# address for the master. (In the case of upgrade/repair, we re-use
|
||||
# the same IP.)
|
||||
#
|
||||
# It requires a whole slew of assumed variables, partially due to to
|
||||
# the call to write-master-env. Listing them would be rather
|
||||
# futile. Instead, we list the required calls to ensure any additional
|
||||
#
|
||||
# variables are set:
|
||||
# ensure-temp-dir
|
||||
# detect-project
|
||||
# get-bearer-token
|
||||
function create-master-instance {
|
||||
local address_opt=""
|
||||
[[ -n ${1:-} ]] && address_opt="--address ${1}"
|
||||
|
||||
write-master-env
|
||||
ensure-gci-metadata-files
|
||||
create-master-instance-internal "${MASTER_NAME}" "${address_opt}"
|
||||
}
|
||||
|
||||
function replicate-master-instance() {
|
||||
local existing_master_zone="${1}"
|
||||
local existing_master_name="${2}"
|
||||
local existing_master_replicas="${3}"
|
||||
|
||||
local kube_env="$(get-metadata "${existing_master_zone}" "${existing_master_name}" kube-env)"
|
||||
# Substitute INITIAL_ETCD_CLUSTER to enable etcd clustering.
|
||||
kube_env="$(echo "${kube_env}" | grep -v "INITIAL_ETCD_CLUSTER")"
|
||||
kube_env="$(echo -e "${kube_env}\nINITIAL_ETCD_CLUSTER: '${existing_master_replicas},${REPLICA_NAME}'")"
|
||||
ETCD_CA_KEY="$(echo "${kube_env}" | grep "ETCD_CA_KEY" | sed "s/^.*: '//" | sed "s/'$//")"
|
||||
ETCD_CA_CERT="$(echo "${kube_env}" | grep "ETCD_CA_CERT" | sed "s/^.*: '//" | sed "s/'$//")"
|
||||
|
||||
create-etcd-certs "${REPLICA_NAME}" "${ETCD_CA_CERT}" "${ETCD_CA_KEY}"
|
||||
|
||||
kube_env="$(echo "${kube_env}" | grep -v "ETCD_PEER_KEY")"
|
||||
kube_env="$(echo -e "${kube_env}\nETCD_PEER_KEY: '${ETCD_PEER_KEY_BASE64}'")"
|
||||
kube_env="$(echo "${kube_env}" | grep -v "ETCD_PEER_CERT")"
|
||||
kube_env="$(echo -e "${kube_env}\nETCD_PEER_CERT: '${ETCD_PEER_CERT_BASE64}'")"
|
||||
|
||||
echo "${kube_env}" > ${KUBE_TEMP}/master-kube-env.yaml
|
||||
get-metadata "${existing_master_zone}" "${existing_master_name}" cluster-name > "${KUBE_TEMP}/cluster-name.txt"
|
||||
get-metadata "${existing_master_zone}" "${existing_master_name}" gci-update-strategy > "${KUBE_TEMP}/gci-update.txt"
|
||||
get-metadata "${existing_master_zone}" "${existing_master_name}" gci-ensure-gke-docker > "${KUBE_TEMP}/gci-ensure-gke-docker.txt"
|
||||
get-metadata "${existing_master_zone}" "${existing_master_name}" gci-docker-version > "${KUBE_TEMP}/gci-docker-version.txt"
|
||||
|
||||
create-master-instance-internal "${REPLICA_NAME}"
|
||||
}
|
||||
|
||||
|
||||
function create-master-instance-internal() {
|
||||
local -r master_name="${1}"
|
||||
local -r address_option="${2:-}"
|
||||
gcloud compute instances create "${master_name}" \
|
||||
${address_option} \
|
||||
--project "${PROJECT}" \
|
||||
--zone "${ZONE}" \
|
||||
--machine-type "${MASTER_SIZE}" \
|
||||
--image-project="${MASTER_IMAGE_PROJECT}" \
|
||||
--image "${MASTER_IMAGE}" \
|
||||
--tags "${MASTER_TAG}" \
|
||||
--network "${NETWORK}" \
|
||||
--scopes "storage-ro,compute-rw,monitoring,logging-write" \
|
||||
--can-ip-forward \
|
||||
--metadata-from-file \
|
||||
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/gci/master.yaml,configure-sh=${KUBE_ROOT}/cluster/gce/gci/configure.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt,gci-update-strategy=${KUBE_TEMP}/gci-update.txt,gci-ensure-gke-docker=${KUBE_TEMP}/gci-ensure-gke-docker.txt,gci-docker-version=${KUBE_TEMP}/gci-docker-version.txt" \
|
||||
--disk "name=${master_name}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
|
||||
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}"
|
||||
}
|
||||
|
||||
function get-metadata() {
|
||||
local zone="${1}"
|
||||
local name="${2}"
|
||||
local key="${3}"
|
||||
gcloud compute ssh "${name}" \
|
||||
--project "${PROJECT}" \
|
||||
--zone "${zone}" \
|
||||
--command "curl \"http://metadata.google.internal/computeMetadata/v1/instance/attributes/${key}\" -H \"Metadata-Flavor: Google\"" 2>/dev/null
|
||||
}
|
||||
124
vendor/k8s.io/kubernetes/cluster/gce/gci/master.yaml
generated
vendored
Normal file
124
vendor/k8s.io/kubernetes/cluster/gce/gci/master.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
#cloud-config
|
||||
|
||||
write_files:
|
||||
- path: /etc/systemd/system/kube-master-installation.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download and install k8s binaries and configurations
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/mkdir -p /home/kubernetes/bin
|
||||
ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin
|
||||
ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin
|
||||
ExecStartPre=/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error -H "X-Google-Metadata-Request: True" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh
|
||||
ExecStart=/home/kubernetes/bin/configure.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-master-configuration.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Configure kubernetes master
|
||||
After=kube-master-installation.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/mounter
|
||||
ExecStart=/home/kubernetes/bin/configure-helper.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-docker-monitor.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes health monitoring for docker
|
||||
After=kube-master-configuration.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
RemainAfterExit=yes
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
||||
ExecStart=/home/kubernetes/bin/health-monitor.sh docker
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kubelet-monitor.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes health monitoring for kubelet
|
||||
After=kube-master-configuration.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
RemainAfterExit=yes
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
||||
ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-logrotate.timer
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Hourly kube-logrotate invocation
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-logrotate.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes log rotation
|
||||
After=kube-master-configuration.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=-/usr/sbin/logrotate /etc/logrotate.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kubernetes.target
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes
|
||||
|
||||
runcmd:
|
||||
- systemctl daemon-reload
|
||||
- systemctl enable kube-master-installation.service
|
||||
- systemctl enable kube-master-configuration.service
|
||||
- systemctl enable kube-docker-monitor.service
|
||||
- systemctl enable kubelet-monitor.service
|
||||
- systemctl enable kube-logrotate.timer
|
||||
- systemctl enable kube-logrotate.service
|
||||
- systemctl start kubernetes.target
|
||||
7
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/Changelog
generated
vendored
Normal file
7
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/Changelog
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
## v1 (Thu Oct 20 2016 Vishnu Kannan <vishh@google.com>)
|
||||
- Creating a container with mount tools pre-installed
|
||||
- Digest: sha256:9b3c1f04ad6b8947af4eb98f1eff2dc54c5664e3469b4cdf722ec5dd2a1dc064
|
||||
|
||||
## v2 (Fri Oct 28 2016 Vishnu Kannan <vishh@google.com>)
|
||||
- Adding netbase package.
|
||||
- Digest: sha256:c7dfe059fbbf976fc4284a87eb18adf0f8e0c4cf30a30f5a852842c772a64c2d
|
||||
20
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/Dockerfile
generated
vendored
Normal file
20
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/Dockerfile
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# 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 ubuntu:xenial
|
||||
MAINTAINER vishh@google.com
|
||||
|
||||
RUN apt-get update && apt-get install -y netbase nfs-common=1:1.2.8-9ubuntu12 glusterfs-client=3.7.6-1ubuntu1
|
||||
|
||||
ENTRYPOINT ["/bin/mount"]
|
||||
30
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/Makefile
generated
vendored
Normal file
30
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/Makefile
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# 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.
|
||||
|
||||
TAG=v2
|
||||
REGISTRY=gcr.io/google_containers
|
||||
IMAGE=gci-mounter
|
||||
|
||||
all: container
|
||||
|
||||
container:
|
||||
docker build --pull -t ${REGISTRY}/${IMAGE}:${TAG} .
|
||||
|
||||
push:
|
||||
gcloud docker -- push ${REGISTRY}/${IMAGE}:${TAG}
|
||||
|
||||
upload:
|
||||
./stage-upload.sh ${TAG} ${REGISTRY}/${IMAGE}:${TAG}
|
||||
|
||||
.PHONY: all container push
|
||||
55
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/mounter
generated
vendored
Executable file
55
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/mounter
generated
vendored
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2014 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 -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
MOUNTER_VERSION=v2
|
||||
MOUNTER_USER=root
|
||||
ROOT_DIR=/home/kubernetes/bin
|
||||
RKT_BINARY=${ROOT_DIR}/rkt
|
||||
STAGE1_ACI=${ROOT_DIR}/stage1-fly.aci
|
||||
MOUNTER_ACI=${ROOT_DIR}/gci-mounter-${MOUNTER_VERSION}.aci
|
||||
MOUNTER_IMAGE=gcr.io/google_containers/gci-mounter:${MOUNTER_VERSION}
|
||||
|
||||
function gc {
|
||||
# Attempt to garbage collect rkt pods with 5 retries.
|
||||
# Rkt pods end up creating new copies of mounts on the host. Hence it is ideal to clean them up right away.
|
||||
attempt=0
|
||||
until [ $attempt -ge 5 ]; do
|
||||
${RKT_BINARY} gc --grace-period=0s &> /dev/null && break
|
||||
attempt=$[$attempt+1]
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
# Garbage collect old rkt containers on exit
|
||||
trap gc EXIT
|
||||
|
||||
if [[ ! $(${RKT_BINARY} image list | grep ${MOUNTER_IMAGE}) ]]; then
|
||||
${RKT_BINARY} fetch --insecure-options=image file://${MOUNTER_ACI}
|
||||
fi
|
||||
|
||||
echo "Running mount using a rkt fly container"
|
||||
|
||||
${RKT_BINARY} run --stage1-path=${STAGE1_ACI} \
|
||||
--insecure-options=image \
|
||||
--volume=kubelet,kind=host,source=/var/lib/kubelet,readOnly=false,recursive=true \
|
||||
--mount volume=kubelet,target=/var/lib/kubelet \
|
||||
${MOUNTER_IMAGE} --user=${MOUNTER_USER} --exec /bin/mount -- "$@"
|
||||
|
||||
echo "Successfully ran mount using a rkt fly container"
|
||||
86
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/stage-upload.sh
generated
vendored
Executable file
86
vendor/k8s.io/kubernetes/cluster/gce/gci/mounter/stage-upload.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,86 @@
|
|||
#!/bin/sh
|
||||
|
||||
# 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.
|
||||
|
||||
# Due to the GCE custom metadata size limit, we split the entire script into two
|
||||
# files configure.sh and configure-helper.sh. The functionality of downloading
|
||||
# kubernetes configuration, manifests, docker images, and binary files are
|
||||
# put in configure.sh, which is uploaded via GCE custom metadata.
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
RKT_VERSION="v1.18.0"
|
||||
DOCKER2ACI_VERSION="v0.13.0"
|
||||
MOUNTER_VERSION=$1
|
||||
DOCKER_IMAGE=docker://$2
|
||||
MOUNTER_ACI_IMAGE=gci-mounter-${MOUNTER_VERSION}.aci
|
||||
RKT_GCS_DIR=gs://kubernetes-release/rkt/
|
||||
MOUNTER_GCS_DIR=gs://kubernetes-release/gci-mounter/
|
||||
|
||||
TMPDIR=/tmp
|
||||
# Setup a working directory
|
||||
DOWNLOAD_DIR=$(mktemp --tmpdir=${TMPDIR} -d gci-mounter-build.XXXXXXXXXX)
|
||||
|
||||
# Setup a staging directory
|
||||
STAGING_DIR=$(mktemp --tmpdir=${TMPDIR} -d gci-mounter-staging.XXXXXXXXXX)
|
||||
RKT_DIR=${STAGING_DIR}/${RKT_VERSION}
|
||||
ACI_DIR=${STAGING_DIR}/gci-mounter
|
||||
CWD=${PWD}
|
||||
|
||||
# Cleanup the temporary directories
|
||||
function cleanup {
|
||||
rm -rf ${DOWNLOAD_DIR}
|
||||
rm -rf ${STAGING_DIR}
|
||||
cd ${CWD}
|
||||
}
|
||||
|
||||
# Delete temporary directories on exit
|
||||
trap cleanup EXIT
|
||||
|
||||
mkdir ${RKT_DIR}
|
||||
mkdir ${ACI_DIR}
|
||||
|
||||
# Download rkt
|
||||
cd ${DOWNLOAD_DIR}
|
||||
echo "Downloading rkt ${RKT_VERSION}"
|
||||
wget "https://github.com/coreos/rkt/releases/download/${RKT_VERSION}/rkt-${RKT_VERSION}.tar.gz" &> /dev/null
|
||||
echo "Extracting rkt ${RKT_VERSION}"
|
||||
tar xzf rkt-${RKT_VERSION}.tar.gz
|
||||
|
||||
# Stage rkt into working directory
|
||||
cp rkt-${RKT_VERSION}/rkt ${RKT_DIR}/rkt
|
||||
cp rkt-${RKT_VERSION}/stage1-fly.aci ${RKT_DIR}/
|
||||
|
||||
# Convert docker image to aci and stage it
|
||||
echo "Downloading docker2aci ${DOCKER2ACI_VERSION}"
|
||||
wget "https://github.com/appc/docker2aci/releases/download/${DOCKER2ACI_VERSION}/docker2aci-${DOCKER2ACI_VERSION}.tar.gz" &> /dev/null
|
||||
echo "Extracting docker2aci ${DOCKER2ACI_VERSION}"
|
||||
tar xzf docker2aci-${DOCKER2ACI_VERSION}.tar.gz
|
||||
ACI_IMAGE=$(${DOWNLOAD_DIR}/docker2aci-${DOCKER2ACI_VERSION}/docker2aci ${DOCKER_IMAGE} 2>/dev/null | tail -n 1)
|
||||
cp ${ACI_IMAGE} ${ACI_DIR}/${MOUNTER_ACI_IMAGE}
|
||||
|
||||
# Upload the contents to gcs
|
||||
echo "Uploading rkt artifacts in ${RKT_DIR} to ${RKT_GCS_DIR}"
|
||||
gsutil cp -R ${RKT_DIR} ${RKT_GCS_DIR}
|
||||
echo "Uploading gci mounter ACI in ${ACI_DIR} to ${MOUNTER_GCS_DIR}"
|
||||
gsutil cp ${ACI_DIR}/${MOUNTER_ACI_IMAGE} ${MOUNTER_GCS_DIR}
|
||||
|
||||
echo "Upload completed"
|
||||
echo "Update rkt, stag1-fly.aci & gci-mounter ACI versions and SHA1 in cluster/gce/gci/configure.sh"
|
||||
echo "${RKT_VERSION}/rkt sha1: $(sha1sum ${RKT_DIR}/rkt)"
|
||||
echo "${RKT_VERSION}/stage1-fly.aci sha1: $(sha1sum ${RKT_DIR}/stage1-fly.aci)"
|
||||
echo "${MOUNTER_ACI_IMAGE} hash: $(sha1sum ${ACI_DIR}/${MOUNTER_ACI_IMAGE})"
|
||||
32
vendor/k8s.io/kubernetes/cluster/gce/gci/node-helper.sh
generated
vendored
Executable file
32
vendor/k8s.io/kubernetes/cluster/gce/gci/node-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,32 @@
|
|||
#!/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.
|
||||
|
||||
# A library of helper functions and constant for GCI distro
|
||||
source "${KUBE_ROOT}/cluster/gce/gci/helper.sh"
|
||||
|
||||
# $1: template name (required).
|
||||
function create-node-instance-template {
|
||||
local template_name="$1"
|
||||
ensure-gci-metadata-files
|
||||
create-node-template "$template_name" "${scope_flags[*]}" \
|
||||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \
|
||||
"user-data=${KUBE_ROOT}/cluster/gce/gci/node.yaml" \
|
||||
"configure-sh=${KUBE_ROOT}/cluster/gce/gci/configure.sh" \
|
||||
"cluster-name=${KUBE_TEMP}/cluster-name.txt" \
|
||||
"gci-update-strategy=${KUBE_TEMP}/gci-update.txt" \
|
||||
"gci-ensure-gke-docker=${KUBE_TEMP}/gci-ensure-gke-docker.txt" \
|
||||
"gci-docker-version=${KUBE_TEMP}/gci-docker-version.txt"
|
||||
}
|
||||
124
vendor/k8s.io/kubernetes/cluster/gce/gci/node.yaml
generated
vendored
Normal file
124
vendor/k8s.io/kubernetes/cluster/gce/gci/node.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
#cloud-config
|
||||
|
||||
write_files:
|
||||
- path: /etc/systemd/system/kube-node-installation.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Download and install k8s binaries and configurations
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/mkdir -p /home/kubernetes/bin
|
||||
ExecStartPre=/bin/mount --bind /home/kubernetes/bin /home/kubernetes/bin
|
||||
ExecStartPre=/bin/mount -o remount,exec /home/kubernetes/bin
|
||||
ExecStartPre=/usr/bin/curl --fail --retry 5 --retry-delay 3 --silent --show-error -H "X-Google-Metadata-Request: True" -o /home/kubernetes/bin/configure.sh http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure.sh
|
||||
ExecStart=/home/kubernetes/bin/configure.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-node-configuration.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Configure kubernetes node
|
||||
After=kube-node-installation.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/configure-helper.sh
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/mounter
|
||||
ExecStart=/home/kubernetes/bin/configure-helper.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-docker-monitor.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes health monitoring for docker
|
||||
After=kube-node-configuration.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
RemainAfterExit=yes
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
||||
ExecStart=/home/kubernetes/bin/health-monitor.sh docker
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kubelet-monitor.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes health monitoring for kubelet
|
||||
After=kube-node-configuration.service
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
RemainAfterExit=yes
|
||||
RemainAfterExit=yes
|
||||
ExecStartPre=/bin/chmod 544 /home/kubernetes/bin/health-monitor.sh
|
||||
ExecStart=/home/kubernetes/bin/health-monitor.sh kubelet
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-logrotate.timer
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Hourly kube-logrotate invocation
|
||||
|
||||
[Timer]
|
||||
OnCalendar=hourly
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kube-logrotate.service
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes log rotation
|
||||
After=kube-node-configuration.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=-/usr/sbin/logrotate /etc/logrotate.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=kubernetes.target
|
||||
|
||||
- path: /etc/systemd/system/kubernetes.target
|
||||
permissions: 0644
|
||||
owner: root
|
||||
content: |
|
||||
[Unit]
|
||||
Description=Kubernetes
|
||||
|
||||
runcmd:
|
||||
- systemctl daemon-reload
|
||||
- systemctl enable kube-node-installation.service
|
||||
- systemctl enable kube-node-configuration.service
|
||||
- systemctl enable kube-docker-monitor.service
|
||||
- systemctl enable kubelet-monitor.service
|
||||
- systemctl enable kube-logrotate.timer
|
||||
- systemctl enable kube-logrotate.service
|
||||
- systemctl start kubernetes.target
|
||||
93
vendor/k8s.io/kubernetes/cluster/gce/list-resources.sh
generated
vendored
Executable file
93
vendor/k8s.io/kubernetes/cluster/gce/list-resources.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,93 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# Calls gcloud to print out a variety of Google Cloud Platform resources used by
|
||||
# Kubernetes. Can be run before/after test runs and compared to track leaking
|
||||
# resources.
|
||||
|
||||
# PROJECT must be set in the environment.
|
||||
# If ZONE, KUBE_GCE_INSTANCE_PREFIX, CLUSTER_NAME, KUBE_GCE_NETWORK, or
|
||||
# KUBE_GKE_NETWORK is set, they will be used to filter the results.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
ZONE=${ZONE:-}
|
||||
REGION=${ZONE%-*}
|
||||
INSTANCE_PREFIX=${KUBE_GCE_INSTANCE_PREFIX:-${CLUSTER_NAME:-}}
|
||||
NETWORK=${KUBE_GCE_NETWORK:-${KUBE_GKE_NETWORK:-}}
|
||||
|
||||
# In GKE the instance prefix starts with "gke-".
|
||||
if [[ "${KUBERNETES_PROVIDER:-}" == "gke" ]]; then
|
||||
INSTANCE_PREFIX="gke-${CLUSTER_NAME}"
|
||||
# Truncate to 26 characters for route prefix matching.
|
||||
INSTANCE_PREFIX="${INSTANCE_PREFIX:0:26}"
|
||||
fi
|
||||
|
||||
# Usage: gcloud-compute-list <resource> <additional parameters to gcloud...>
|
||||
# GREP_REGEX is applied to the output of gcloud if set
|
||||
GREP_REGEX=""
|
||||
function gcloud-compute-list() {
|
||||
local -r resource=$1
|
||||
echo -e "\n\n[ ${resource} ]"
|
||||
local attempt=1
|
||||
local result=""
|
||||
while true; do
|
||||
if result=$(gcloud compute ${resource} list --project=${PROJECT} ${@:2}); then
|
||||
if [[ ! -z "${GREP_REGEX}" ]]; then
|
||||
result=$(echo "${result}" | grep "${GREP_REGEX}")
|
||||
fi
|
||||
echo "${result}"
|
||||
return
|
||||
fi
|
||||
echo -e "Attempt ${attempt} failed to list ${resource}. Retrying." >&2
|
||||
attempt=$(($attempt+1))
|
||||
if [[ ${attempt} > 5 ]]; then
|
||||
echo -e "List ${resource} failed!" >&2
|
||||
exit 2
|
||||
fi
|
||||
sleep $((5*${attempt}))
|
||||
done
|
||||
}
|
||||
|
||||
echo "Project: ${PROJECT}"
|
||||
echo "Region: ${REGION}"
|
||||
echo "Zone: ${ZONE}"
|
||||
echo "Instance prefix: ${INSTANCE_PREFIX:-}"
|
||||
echo "Network: ${NETWORK}"
|
||||
echo "Provider: ${KUBERNETES_PROVIDER:-}"
|
||||
|
||||
# List resources related to instances, filtering by the instance prefix if
|
||||
# provided.
|
||||
gcloud-compute-list instance-templates --regexp="${INSTANCE_PREFIX}.*"
|
||||
gcloud-compute-list instance-groups ${ZONE:+"--zones=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
|
||||
gcloud-compute-list instances ${ZONE:+"--zones=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
|
||||
|
||||
# List disk resources, filterying by instance prefix if provided.
|
||||
gcloud-compute-list disks ${ZONE:+"--zones=${ZONE}"} --regexp="${INSTANCE_PREFIX}.*"
|
||||
|
||||
# List network resources. We include names starting with "a", corresponding to
|
||||
# those that Kubernetes creates.
|
||||
gcloud-compute-list addresses ${REGION:+"--regions=${REGION}"} --regexp="a.*|${INSTANCE_PREFIX}.*"
|
||||
# Match either the header or a line with the specified e2e network.
|
||||
# This assumes that the network name is the second field in the output.
|
||||
GREP_REGEX="^NAME\|^[^ ]\+[ ]\+\(default\|${NETWORK}\) "
|
||||
gcloud-compute-list routes --regexp="default.*|${INSTANCE_PREFIX}.*"
|
||||
gcloud-compute-list firewall-rules --regexp="default.*|k8s-fw.*|${INSTANCE_PREFIX}.*"
|
||||
GREP_REGEX=""
|
||||
gcloud-compute-list forwarding-rules ${REGION:+"--regions=${REGION}"}
|
||||
gcloud-compute-list target-pools ${REGION:+"--regions=${REGION}"}
|
||||
978
vendor/k8s.io/kubernetes/cluster/gce/trusty/configure-helper.sh
generated
vendored
Normal file
978
vendor/k8s.io/kubernetes/cluster/gce/trusty/configure-helper.sh
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
196
vendor/k8s.io/kubernetes/cluster/gce/trusty/configure.sh
generated
vendored
Normal file
196
vendor/k8s.io/kubernetes/cluster/gce/trusty/configure.sh
generated
vendored
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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 script contains functions for configuring instances to run kubernetes
|
||||
# master and nodes. It is uploaded as GCE instance metadata. The upstart jobs
|
||||
# in cluster/gce/trusty/<node.yaml, master.yaml> download it and make use
|
||||
# of needed functions. The script itself is not supposed to be executed in
|
||||
# other manners.
|
||||
|
||||
set_broken_motd() {
|
||||
cat > /etc/motd <<EOF
|
||||
Broken (or in progress) Kubernetes node setup! If you are using Ubuntu Trusty,
|
||||
check log file /var/log/syslog. If you are using GCI image, use
|
||||
"journalctl | grep kube" to find more information.
|
||||
EOF
|
||||
}
|
||||
|
||||
download_kube_env() {
|
||||
# Fetch kube-env from GCE metadata server.
|
||||
readonly tmp_kube_env="/tmp/kube-env.yaml"
|
||||
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o "${tmp_kube_env}" \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/kube-env
|
||||
# Convert the yaml format file into a shell-style file.
|
||||
eval $(python -c '''
|
||||
import pipes,sys,yaml
|
||||
for k,v in yaml.load(sys.stdin).iteritems():
|
||||
print("readonly {var}={value}".format(var = k, value = pipes.quote(str(v))))
|
||||
''' < "${tmp_kube_env}" > /etc/kube-env)
|
||||
rm -f "${tmp_kube_env}"
|
||||
}
|
||||
|
||||
validate_hash() {
|
||||
file="$1"
|
||||
expected="$2"
|
||||
|
||||
actual=$(sha1sum ${file} | awk '{ print $1 }') || true
|
||||
if [ "${actual}" != "${expected}" ]; then
|
||||
echo "== ${file} corrupted, sha1 ${actual} doesn't match expected ${expected} =="
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Retry a download until we get it. Takes a hash and a set of URLs.
|
||||
#
|
||||
# $1: The sha1 of the URL. Can be "" if the sha1 is unknown, which means
|
||||
# we are downloading a hash file.
|
||||
# $2: The temp file containing a list of urls to download.
|
||||
download_or_bust() {
|
||||
file_hash="$1"
|
||||
tmpfile_urls="$2"
|
||||
|
||||
while true; do
|
||||
# Read urls from the file one-by-one.
|
||||
while read -r url; do
|
||||
if [ ! -n "${file_hash}" ]; then
|
||||
url="${url/.tar.gz/.tar.gz.sha1}"
|
||||
fi
|
||||
file="${url##*/}"
|
||||
rm -f "${file}"
|
||||
if ! curl -f --ipv4 -Lo "${file}" --connect-timeout 20 --retry 6 --retry-delay 10 "${url}"; then
|
||||
echo "== Failed to download ${url}. Retrying. =="
|
||||
elif [ -n "${file_hash}" ] && ! validate_hash "${file}" "${file_hash}"; then
|
||||
echo "== Hash validation of ${url} failed. Retrying. =="
|
||||
else
|
||||
if [ -n "${file_hash}" ]; then
|
||||
echo "== Downloaded ${url} (SHA1 = ${file_hash}) =="
|
||||
else
|
||||
echo "== Downloaded ${url} =="
|
||||
fi
|
||||
return
|
||||
fi
|
||||
done < "${tmpfile_urls}"
|
||||
done
|
||||
}
|
||||
|
||||
# Downloads kubernetes binaries and kube-system manifest tarball, unpacks them,
|
||||
# and places them into suitable directories. Files are placed in /home/kubernetes.
|
||||
install_kube_binary_config() {
|
||||
# Upstart does not support shell array well. Put urls in a temp file with one
|
||||
# url at a line, and we will use 'read' command to get them one-by-one.
|
||||
tmp_binary_urls=$(mktemp /tmp/kube-temp.XXXXXX)
|
||||
echo "${SERVER_BINARY_TAR_URL}" | tr "," "\n" > "${tmp_binary_urls}"
|
||||
tmp_manifests_urls=$(mktemp /tmp/kube-temp.XXXXXX)
|
||||
echo "${KUBE_MANIFESTS_TAR_URL}" | tr "," "\n" > "${tmp_manifests_urls}"
|
||||
|
||||
kube_home="/home/kubernetes"
|
||||
mkdir -p "${kube_home}"
|
||||
cd "${kube_home}"
|
||||
read -r server_binary_tar_url < "${tmp_binary_urls}"
|
||||
readonly server_binary_tar="${server_binary_tar_url##*/}"
|
||||
if [ -n "${SERVER_BINARY_TAR_HASH:-}" ]; then
|
||||
readonly server_binary_tar_hash="${SERVER_BINARY_TAR_HASH}"
|
||||
else
|
||||
echo "Downloading binary release sha1 (not found in env)"
|
||||
download_or_bust "" "${tmp_binary_urls}"
|
||||
readonly server_binary_tar_hash=$(cat "${server_binary_tar}.sha1")
|
||||
fi
|
||||
echo "Downloading binary release tar"
|
||||
download_or_bust "${server_binary_tar_hash}" "${tmp_binary_urls}"
|
||||
tar xzf "${kube_home}/${server_binary_tar}" -C "${kube_home}" --overwrite
|
||||
# Copy docker_tag and image files to /home/kubernetes/kube-docker-files.
|
||||
src_dir="${kube_home}/kubernetes/server/bin"
|
||||
dst_dir="${kube_home}/kube-docker-files"
|
||||
mkdir -p "${dst_dir}"
|
||||
cp "${src_dir}/"*.docker_tag "${dst_dir}"
|
||||
if [ "${KUBERNETES_MASTER:-}" = "false" ]; then
|
||||
cp "${src_dir}/kube-proxy.tar" "${dst_dir}"
|
||||
else
|
||||
cp "${src_dir}/kube-apiserver.tar" "${dst_dir}"
|
||||
cp "${src_dir}/kube-controller-manager.tar" "${dst_dir}"
|
||||
cp "${src_dir}/kube-scheduler.tar" "${dst_dir}"
|
||||
cp -r "${kube_home}/kubernetes/addons" "${dst_dir}"
|
||||
fi
|
||||
# Use the binary from the release tarball if they are not preinstalled, or if this is
|
||||
# a test cluster.
|
||||
readonly BIN_PATH="/usr/bin"
|
||||
if ! which kubelet > /dev/null || ! which kubectl > /dev/null; then
|
||||
# This should be the case of trusty.
|
||||
cp "${src_dir}/kubelet" "${BIN_PATH}"
|
||||
cp "${src_dir}/kubectl" "${BIN_PATH}"
|
||||
else
|
||||
# This should be the case of GCI.
|
||||
readonly kube_bin="${kube_home}/bin"
|
||||
mkdir -p "${kube_bin}"
|
||||
mount --bind "${kube_bin}" "${kube_bin}"
|
||||
mount -o remount,rw,exec "${kube_bin}"
|
||||
cp "${src_dir}/kubelet" "${kube_bin}"
|
||||
cp "${src_dir}/kubectl" "${kube_bin}"
|
||||
chmod 544 "${kube_bin}/kubelet"
|
||||
chmod 544 "${kube_bin}/kubectl"
|
||||
# If the built-in binary version is different from the expected version, we use
|
||||
# the downloaded binary. The simplest implementation is to always use the downloaded
|
||||
# binary without checking the version. But we have another version guardian in GKE.
|
||||
# So, we compare the versions to ensure this run-time binary replacement is only
|
||||
# applied for OSS kubernetes.
|
||||
readonly builtin_version="$(/usr/bin/kubelet --version=true | cut -f2 -d " ")"
|
||||
readonly required_version="$(/home/kubernetes/bin/kubelet --version=true | cut -f2 -d " ")"
|
||||
if [ "${TEST_CLUSTER:-}" = "true" ] || [ "${builtin_version}" != "${required_version}" ]; then
|
||||
mount --bind "${kube_bin}/kubelet" "${BIN_PATH}/kubelet"
|
||||
mount --bind "${kube_bin}/kubectl" "${BIN_PATH}/kubectl"
|
||||
else
|
||||
# Remove downloaded binary just to prevent misuse.
|
||||
rm -f "${kube_bin}/kubelet"
|
||||
rm -f "${kube_bin}/kubectl"
|
||||
fi
|
||||
fi
|
||||
cp "${kube_home}/kubernetes/LICENSES" "${kube_home}"
|
||||
|
||||
# Put kube-system pods manifests in /home/kubernetes/kube-manifests/.
|
||||
dst_dir="${kube_home}/kube-manifests"
|
||||
mkdir -p "${dst_dir}"
|
||||
read -r manifests_tar_url < "${tmp_manifests_urls}"
|
||||
readonly manifests_tar="${manifests_tar_url##*/}"
|
||||
if [ -n "${KUBE_MANIFESTS_TAR_HASH:-}" ]; then
|
||||
readonly manifests_tar_hash="${KUBE_MANIFESTS_TAR_HASH}"
|
||||
else
|
||||
echo "Downloading k8s manifests sha1 (not found in env)"
|
||||
download_or_bust "" "${tmp_manifests_urls}"
|
||||
readonly manifests_tar_hash=$(cat "${manifests_tar}.sha1")
|
||||
fi
|
||||
echo "Downloading k8s manifests tar"
|
||||
download_or_bust "${manifests_tar_hash}" "${tmp_manifests_urls}"
|
||||
tar xzf "${kube_home}/${manifests_tar}" -C "${dst_dir}" --overwrite
|
||||
readonly kube_addon_registry="${KUBE_ADDON_REGISTRY:-gcr.io/google_containers}"
|
||||
if [ "${kube_addon_registry}" != "gcr.io/google_containers" ]; then
|
||||
find "${dst_dir}" -name \*.yaml -or -name \*.yaml.in | \
|
||||
xargs sed -ri "s@(image:\s.*)gcr.io/google_containers@\1${kube_addon_registry}@"
|
||||
find "${dst_dir}" -name \*.manifest -or -name \*.json | \
|
||||
xargs sed -ri "s@(image\":\s+\")gcr.io/google_containers@\1${kube_addon_registry}@"
|
||||
fi
|
||||
cp "${dst_dir}/kubernetes/gci-trusty/trusty-configure-helper.sh" /etc/kube-configure-helper.sh
|
||||
|
||||
# Clean up.
|
||||
rm -rf "${kube_home}/kubernetes"
|
||||
rm -f "${kube_home}/${server_binary_tar}"
|
||||
rm -f "${kube_home}/${server_binary_tar}.sha1"
|
||||
rm -f "${kube_home}/${manifests_tar}"
|
||||
rm -f "${kube_home}/${manifests_tar}.sha1"
|
||||
rm -f "${tmp_binary_urls}"
|
||||
rm -f "${tmp_manifests_urls}"
|
||||
}
|
||||
39
vendor/k8s.io/kubernetes/cluster/gce/trusty/helper.sh
generated
vendored
Executable file
39
vendor/k8s.io/kubernetes/cluster/gce/trusty/helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A library of helper functions and constant for ubuntu os distro
|
||||
|
||||
# The configuration is based on upstart, which is in Ubuntu up to 14.04 LTS (Trusty).
|
||||
# Ubuntu 15.04 and above replaced upstart with systemd as the init system.
|
||||
# Consequently, the configuration cannot work on these images. In release-1.2 branch,
|
||||
# GCI and Trusty share the configuration code. We have to keep the GCI specific code
|
||||
# here as long as the release-1.2 branch has not been deprecated.
|
||||
|
||||
# Creates the GCI specific metadata files if they do not exit.
|
||||
# Assumed var
|
||||
# KUBE_TEMP
|
||||
function ensure-gci-metadata-files {
|
||||
if [[ ! -f "${KUBE_TEMP}/gci-update.txt" ]]; then
|
||||
cat >"${KUBE_TEMP}/gci-update.txt" << EOF
|
||||
update_disabled
|
||||
EOF
|
||||
fi
|
||||
if [[ ! -f "${KUBE_TEMP}/gci-docker.txt" ]]; then
|
||||
cat >"${KUBE_TEMP}/gci-docker.txt" << EOF
|
||||
true
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
65
vendor/k8s.io/kubernetes/cluster/gce/trusty/master-helper.sh
generated
vendored
Executable file
65
vendor/k8s.io/kubernetes/cluster/gce/trusty/master-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,65 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A library of helper functions and constant for ubuntu os distro
|
||||
|
||||
# The configuration is based on upstart, which is in Ubuntu up to 14.04 LTS (Trusty).
|
||||
# Ubuntu 15.04 and above replaced upstart with systemd as the init system.
|
||||
# Consequently, the configuration cannot work on these images. In release-1.2 branch,
|
||||
# GCI and Trusty share the configuration code. We have to keep the GCI specific code
|
||||
# here as long as the release-1.2 branch has not been deprecated.
|
||||
|
||||
source ./helper.sh
|
||||
|
||||
# create-master-instance creates the master instance. If called with
|
||||
# an argument, the argument is used as the name to a reserved IP
|
||||
# address for the master. (In the case of upgrade/repair, we re-use
|
||||
# the same IP.)
|
||||
#
|
||||
# It requires a whole slew of assumed variables, partially due to to
|
||||
# the call to write-master-env. Listing them would be rather
|
||||
# futile. Instead, we list the required calls to ensure any additional
|
||||
# variables are set:
|
||||
# ensure-temp-dir
|
||||
# detect-project
|
||||
# get-bearer-token
|
||||
#
|
||||
function create-master-instance {
|
||||
local address_opt=""
|
||||
[[ -n ${1:-} ]] && address_opt="--address ${1}"
|
||||
local image_metadata=""
|
||||
if [[ "${MASTER_OS_DISTRIBUTION}" == "gci" ]]; then
|
||||
ensure-gci-metadata-files
|
||||
image_metadata=",gci-update-strategy=${KUBE_TEMP}/gci-update.txt,gci-ensure-gke-docker=${KUBE_TEMP}/gci-docker.txt"
|
||||
fi
|
||||
|
||||
write-master-env
|
||||
gcloud compute instances create "${MASTER_NAME}" \
|
||||
${address_opt} \
|
||||
--project "${PROJECT}" \
|
||||
--zone "${ZONE}" \
|
||||
--machine-type "${MASTER_SIZE}" \
|
||||
--image-project="${MASTER_IMAGE_PROJECT}" \
|
||||
--image "${MASTER_IMAGE}" \
|
||||
--tags "${MASTER_TAG}" \
|
||||
--network "${NETWORK}" \
|
||||
--scopes "storage-ro,compute-rw,monitoring,logging-write" \
|
||||
--can-ip-forward \
|
||||
--metadata-from-file \
|
||||
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/trusty/master.yaml,configure-sh=${KUBE_ROOT}/cluster/gce/trusty/configure.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt${image_metadata}" \
|
||||
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \
|
||||
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}"
|
||||
}
|
||||
233
vendor/k8s.io/kubernetes/cluster/gce/trusty/master.yaml
generated
vendored
Normal file
233
vendor/k8s.io/kubernetes/cluster/gce/trusty/master.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
From nobody Thu May 13 20:33:00 2016
|
||||
Content-Type: multipart/mixed; boundary="===================================="
|
||||
MIME-Version: 1.0
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-install-master.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Download and install k8s binaries and configurations"
|
||||
|
||||
start on cloud-config
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
# Fetch the script for installing master binary and configuration files.
|
||||
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /etc/kube-configure.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
||||
. /etc/kube-configure.sh
|
||||
set_broken_motd
|
||||
echo "Downloading kube-env file"
|
||||
download_kube_env
|
||||
. /etc/kube-env
|
||||
echo "Install kube master binary and configuration files"
|
||||
install_kube_binary_config
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-env.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Prepare kube master environment"
|
||||
|
||||
start on stopped kube-install-master
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
echo "Configuring hostname"
|
||||
config_hostname
|
||||
echo "Configuring IP firewall rules"
|
||||
config_ip_firewall
|
||||
echo "Creating required directories"
|
||||
create_dirs
|
||||
echo "Mount master PD"
|
||||
mount_master_pd
|
||||
echo "Creating kubernetes master auth file"
|
||||
create_master_auth
|
||||
echo "Creating master instance kubelet auth file"
|
||||
create_master_kubelet_auth
|
||||
echo "Creating auth files for etcd"
|
||||
create-master-etcd-auth
|
||||
echo "Assemble kubelet command line"
|
||||
# Kubelet command flags will be written in /etc/default/kubelet
|
||||
assemble_kubelet_flags
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-install-packages.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Install packages needed to run kubernetes"
|
||||
|
||||
start on stopped kube-install-master
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
install_critical_packages
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-install-additional-packages.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Install additional packages used by kubernetes"
|
||||
|
||||
start on stopped kube-install-packages
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
install_additional_packages
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kubelet.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Run kubelet service"
|
||||
|
||||
start on stopped kube-install-packages and stopped kube-env
|
||||
|
||||
respawn
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
start_kubelet
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
# Wait for 10s to start kubelet again.
|
||||
post-stop exec sleep 10
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-docker.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Restart docker daemon"
|
||||
|
||||
start on started kubelet
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
restart_docker_daemon
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-master-components.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Start kube-master components and addons pods"
|
||||
|
||||
start on stopped kube-docker
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
start_etcd_servers
|
||||
start_fluentd
|
||||
compute_master_manifest_variables
|
||||
start_kube_apiserver
|
||||
start_kube_controller_manager
|
||||
start_kube_scheduler
|
||||
start_kube_addons
|
||||
start_cluster_autoscaler
|
||||
start_rescheduler
|
||||
reset_motd
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-master-health-monitoring.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Kubernetes master health monitoring"
|
||||
|
||||
start on stopped kube-docker
|
||||
|
||||
respawn
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
# Wait for a minute to let docker and kubelet processes finish initialization.
|
||||
# TODO(andyzheng0831): replace it with a more reliable method if possible.
|
||||
sleep 60
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
health_monitoring
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
# Wait for 10s to start it again.
|
||||
post-stop exec sleep 10
|
||||
|
||||
--====================================--
|
||||
38
vendor/k8s.io/kubernetes/cluster/gce/trusty/node-helper.sh
generated
vendored
Executable file
38
vendor/k8s.io/kubernetes/cluster/gce/trusty/node-helper.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# A library of helper functions and constant for ubuntu os distro
|
||||
|
||||
# The configuration is based on upstart, which is in Ubuntu up to 14.04 LTS (Trusty).
|
||||
# Ubuntu 15.04 and above replaced upstart with systemd as the init system.
|
||||
# Consequently, the configuration cannot work on these images. In release-1.2 branch,
|
||||
# GCI and Trusty share the configuration code. We have to keep the GCI specific code
|
||||
# here as long as the release-1.2 branch has not been deprecated.
|
||||
|
||||
source ./helper.sh
|
||||
|
||||
# $1: template name (required)
|
||||
function create-node-instance-template {
|
||||
local template_name="$1"
|
||||
ensure-gci-metadata-files
|
||||
create-node-template "$template_name" "${scope_flags[*]}" \
|
||||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \
|
||||
"user-data=${KUBE_ROOT}/cluster/gce/trusty/node.yaml" \
|
||||
"configure-sh=${KUBE_ROOT}/cluster/gce/trusty/configure.sh" \
|
||||
"cluster-name=${KUBE_TEMP}/cluster-name.txt" \
|
||||
"gci-update-strategy=${KUBE_TEMP}/gci-update.txt" \
|
||||
"gci-ensure-gke-docker=${KUBE_TEMP}/gci-docker.txt"
|
||||
}
|
||||
284
vendor/k8s.io/kubernetes/cluster/gce/trusty/node.yaml
generated
vendored
Normal file
284
vendor/k8s.io/kubernetes/cluster/gce/trusty/node.yaml
generated
vendored
Normal file
|
|
@ -0,0 +1,284 @@
|
|||
From nobody Thu May 13 20:33:00 2016
|
||||
Content-Type: multipart/mixed; boundary="===================================="
|
||||
MIME-Version: 1.0
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-install-node.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Download and install k8s binaries and configurations"
|
||||
|
||||
start on cloud-config
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
# Fetch the script for installing nodes binary and configuration files.
|
||||
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
|
||||
-H "X-Google-Metadata-Request: True" \
|
||||
-o /etc/kube-configure.sh \
|
||||
http://metadata.google.internal/computeMetadata/v1/instance/attributes/configure-sh
|
||||
. /etc/kube-configure.sh
|
||||
set_broken_motd
|
||||
echo "Downloading kube-env file"
|
||||
download_kube_env
|
||||
. /etc/kube-env
|
||||
echo "Install kube nodes binary and configuration files"
|
||||
install_kube_binary_config
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-env.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Prepare kube node environment"
|
||||
|
||||
start on stopped kube-install-node
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
echo "Configuring hostname"
|
||||
config_hostname
|
||||
echo "Configuring IP firewall rules"
|
||||
config_ip_firewall
|
||||
echo "Creating required directories"
|
||||
create_dirs
|
||||
echo "Creating kubelet kubeconfig file"
|
||||
create_kubelet_kubeconfig
|
||||
echo "Creating kube-proxy kubeconfig file"
|
||||
create_kubeproxy_kubeconfig
|
||||
echo "Assemble kubelet command line"
|
||||
# Kubelet command flags will be in /etc/default/kubelet
|
||||
assemble_kubelet_flags
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-install-packages.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Install packages needed to run kubernetes"
|
||||
|
||||
start on stopped kube-install-node
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
install_critical_packages
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-install-additional-packages.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Install additional packages used by kubernetes"
|
||||
|
||||
start on stopped kube-install-packages
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
install_additional_packages
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kubelet.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Run kubelet service"
|
||||
|
||||
start on stopped kube-install-packages and stopped kube-env
|
||||
|
||||
respawn
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
start_kubelet
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
# Wait for 10s to start kubelet again.
|
||||
post-stop exec sleep 10
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-docker.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Restart docker daemon"
|
||||
|
||||
start on started kubelet
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
restart_docker_daemon
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-proxy.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Start kube-proxy static pod"
|
||||
|
||||
start on stopped kube-docker
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
prepare_log_file "/var/log/kube-proxy.log"
|
||||
# Load the docker image from file /home/kubernetes/kube-docker-files/kube-proxy.tar.
|
||||
echo "Try to load docker image file kube-proxy.tar"
|
||||
timeout 30 docker load -i /home/kubernetes/kube-docker-files/kube-proxy.tar
|
||||
# Copy the manifest to /tmp to manipulate
|
||||
tmp_file="/tmp/kube-proxy.manifest"
|
||||
cp -f /home/kubernetes/kube-manifests/kubernetes/kube-proxy.manifest ${tmp_file}
|
||||
# Remove the lines of salt configuration and replace variables with values.
|
||||
# NOTE: Changes to variable names in cluster/saltbase/salt/kube-proxy/kube-proxy.manifest
|
||||
# may break this upstart job.
|
||||
sed -i "/^ *{%/d" ${tmp_file}
|
||||
kubeconfig="--kubeconfig=\/var\/lib\/kube-proxy\/kubeconfig"
|
||||
kube_docker_registry="gcr.io\/google_containers"
|
||||
if [ -n "${KUBE_DOCKER_REGISTRY:-}" ]; then
|
||||
kube_docker_registry=${KUBE_DOCKER_REGISTRY}
|
||||
fi
|
||||
kube_proxy_docker_tag=$(cat /home/kubernetes/kube-docker-files/kube-proxy.docker_tag)
|
||||
test_args=""
|
||||
if [ -n "${KUBEPROXY_TEST_ARGS:-}" ]; then
|
||||
test_args="${KUBEPROXY_TEST_ARGS}"
|
||||
fi
|
||||
log_level="--v=2"
|
||||
if [ -n "${KUBEPROXY_TEST_LOG_LEVEL:-}" ]; then
|
||||
log_level="${KUBEPROXY_TEST_LOG_LEVEL}"
|
||||
fi
|
||||
api_servers="--master=https://${KUBERNETES_MASTER_NAME}"
|
||||
sed -i -e "s@{{kubeconfig}}@${kubeconfig}@g" ${tmp_file}
|
||||
sed -i -e "s@{{pillar\['kube_docker_registry'\]}}@${kube_docker_registry}@g" ${tmp_file}
|
||||
sed -i -e "s@{{pillar\['kube-proxy_docker_tag'\]}}@${kube_proxy_docker_tag}@g" ${tmp_file}
|
||||
sed -i -e "s@{{test_args}}@${test_args}@g" ${tmp_file}
|
||||
sed -i -e "s@{{ cpurequest }}@100m@g" ${tmp_file}
|
||||
sed -i -e "s@{{log_level}}@${log_level}@g" ${tmp_file}
|
||||
sed -i -e "s@{{api_servers_with_port}}@${api_servers}@g" ${tmp_file}
|
||||
if [ -n "${CLUSTER_IP_RANGE:-}" ]; then
|
||||
sed -i -e "s@{{cluster_cidr}}@--cluster-cidr=${CLUSTER_IP_RANGE}@g" ${tmp_file}
|
||||
fi
|
||||
|
||||
mv -f ${tmp_file} /etc/kubernetes/manifests/
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-addons.conf"
|
||||
|
||||
#upstart-job
|
||||
|
||||
description "Install kubelet add-on manifest files"
|
||||
|
||||
start on stopped kube-docker
|
||||
|
||||
script
|
||||
{
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
# Fluentd
|
||||
start_fluentd
|
||||
# Kube-registry-proxy
|
||||
if [ "${ENABLE_CLUSTER_REGISTRY:-}" = "true" ]; then
|
||||
cp /home/kubernetes/kube-manifests/kubernetes/kube-registry-proxy.yaml /etc/kubernetes/manifests/
|
||||
fi
|
||||
reset_motd
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
--====================================
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/upstart-job; charset="us-ascii"
|
||||
Content-Transfer-Encoding: 7bit
|
||||
Content-Disposition: attachment; filename="kube-node-health-monitoring.conf"
|
||||
|
||||
description "Kubernetes node health monitoring"
|
||||
|
||||
start on stopped kube-docker
|
||||
|
||||
respawn
|
||||
|
||||
script
|
||||
{
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
# Wait for a minute to let docker, kubelet, and kube-proxy processes finish initialization.
|
||||
# TODO(andyzheng0831): replace it with a more reliable method if possible.
|
||||
sleep 60
|
||||
. /etc/kube-configure-helper.sh
|
||||
. /etc/kube-env
|
||||
health_monitoring
|
||||
} 2>&1 | logger --priority daemon.info -t ${UPSTART_JOB}
|
||||
end script
|
||||
|
||||
# Wait for 10s to start it again.
|
||||
post-stop exec sleep 10
|
||||
|
||||
--====================================--
|
||||
406
vendor/k8s.io/kubernetes/cluster/gce/upgrade.sh
generated
vendored
Executable file
406
vendor/k8s.io/kubernetes/cluster/gce/upgrade.sh
generated
vendored
Executable file
|
|
@ -0,0 +1,406 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright 2015 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.
|
||||
|
||||
# !!!EXPERIMENTAL !!! Upgrade script for GCE. Expect this to get
|
||||
# rewritten in Go in relatively short order, but it allows us to start
|
||||
# testing the concepts.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
if [[ "${KUBERNETES_PROVIDER:-gce}" != "gce" ]]; then
|
||||
echo "!!! ${1} only works on GCE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
|
||||
source "${KUBE_ROOT}/cluster/kube-util.sh"
|
||||
|
||||
function usage() {
|
||||
echo "!!! EXPERIMENTAL !!!"
|
||||
echo ""
|
||||
echo "${0} [-M | -N | -P] [-o] (-l | <version number or publication>)"
|
||||
echo " Upgrades master and nodes by default"
|
||||
echo " -M: Upgrade master only"
|
||||
echo " -N: Upgrade nodes only"
|
||||
echo " -P: Node upgrade prerequisites only (create a new instance template)"
|
||||
echo " -o: Use os distro sepcified in KUBE_NODE_OS_DISTRIBUTION for new nodes. Options include 'debian' or 'gci'"
|
||||
echo " -l: Use local(dev) binaries. This is only supported for master upgrades."
|
||||
echo ""
|
||||
echo ' Version number or publication is either a proper version number'
|
||||
echo ' (e.g. "v1.0.6", "v1.2.0-alpha.1.881+376438b69c7612") or a version'
|
||||
echo ' publication of the form <bucket>/<version> (e.g. "release/stable",'
|
||||
echo ' "ci/latest-1"). Some common ones are:'
|
||||
echo ' - "release/stable"'
|
||||
echo ' - "release/latest"'
|
||||
echo ' - "ci/latest"'
|
||||
echo ' See the docs on getting builds for more information about version publication.'
|
||||
echo ""
|
||||
echo "(... Fetching current release versions ...)"
|
||||
echo ""
|
||||
|
||||
# NOTE: IF YOU CHANGE THE FOLLOWING LIST, ALSO UPDATE test/e2e/cluster_upgrade.go
|
||||
local release_stable
|
||||
local release_latest
|
||||
local ci_latest
|
||||
|
||||
release_stable=$(gsutil cat gs://kubernetes-release/release/stable.txt)
|
||||
release_latest=$(gsutil cat gs://kubernetes-release/release/latest.txt)
|
||||
ci_latest=$(gsutil cat gs://kubernetes-release-dev/ci/latest.txt)
|
||||
|
||||
echo "Right now, versions are as follows:"
|
||||
echo " release/stable: ${0} ${release_stable}"
|
||||
echo " release/latest: ${0} ${release_latest}"
|
||||
echo " ci/latest: ${0} ${ci_latest}"
|
||||
}
|
||||
|
||||
function print-node-version-info() {
|
||||
echo "== $1 Node OS and Kubelet Versions =="
|
||||
"${KUBE_ROOT}/cluster/kubectl.sh" get nodes -o=jsonpath='{range .items[*]}name: "{.metadata.name}", osImage: "{.status.nodeInfo.osImage}", kubeletVersion: "{.status.nodeInfo.kubeletVersion}"{"\n"}{end}'
|
||||
}
|
||||
|
||||
function upgrade-master() {
|
||||
echo "== Upgrading master to '${SERVER_BINARY_TAR_URL}'. Do not interrupt, deleting master instance. =="
|
||||
|
||||
# Tries to figure out KUBE_USER/KUBE_PASSWORD by first looking under
|
||||
# kubeconfig:username, and then under kubeconfig:username-basic-auth.
|
||||
# TODO: KUBE_USER is used in generating ABAC policy which the
|
||||
# apiserver may not have enabled. If it's enabled, we must have a user
|
||||
# to generate a valid ABAC policy. If the username changes, should
|
||||
# the script fail? Should we generate a default username and password
|
||||
# if the section is missing in kubeconfig? Handle this better in 1.5.
|
||||
get-kubeconfig-basicauth
|
||||
get-kubeconfig-bearertoken
|
||||
|
||||
detect-master
|
||||
parse-master-env
|
||||
|
||||
# Delete the master instance. Note that the master-pd is created
|
||||
# with auto-delete=no, so it should not be deleted.
|
||||
gcloud compute instances delete \
|
||||
--project "${PROJECT}" \
|
||||
--quiet \
|
||||
--zone "${ZONE}" \
|
||||
"${MASTER_NAME}"
|
||||
|
||||
create-master-instance "${MASTER_NAME}-ip"
|
||||
wait-for-master
|
||||
}
|
||||
|
||||
function wait-for-master() {
|
||||
echo "== Waiting for new master to respond to API requests =="
|
||||
|
||||
local curl_auth_arg
|
||||
if [[ -n ${KUBE_BEARER_TOKEN:-} ]]; then
|
||||
curl_auth_arg=(-H "Authorization: Bearer ${KUBE_BEARER_TOKEN}")
|
||||
elif [[ -n ${KUBE_PASSWORD:-} ]]; then
|
||||
curl_auth_arg=(--user "${KUBE_USER}:${KUBE_PASSWORD}")
|
||||
else
|
||||
echo "can't get auth credentials for the current master"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
until curl --insecure "${curl_auth_arg[@]}" --max-time 5 \
|
||||
--fail --output /dev/null --silent "https://${KUBE_MASTER_IP}/healthz"; do
|
||||
printf "."
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "== Done =="
|
||||
}
|
||||
|
||||
# Perform common upgrade setup tasks
|
||||
#
|
||||
# Assumed vars
|
||||
# KUBE_VERSION
|
||||
function prepare-upgrade() {
|
||||
ensure-temp-dir
|
||||
detect-project
|
||||
detect-node-names # sets INSTANCE_GROUPS
|
||||
write-cluster-name
|
||||
tars_from_version
|
||||
}
|
||||
|
||||
# Reads kube-env metadata from first node in NODE_NAMES.
|
||||
#
|
||||
# Assumed vars:
|
||||
# NODE_NAMES
|
||||
# PROJECT
|
||||
# ZONE
|
||||
function get-node-env() {
|
||||
# TODO(zmerlynn): Make this more reliable with retries.
|
||||
gcloud compute --project ${PROJECT} ssh --zone ${ZONE} ${NODE_NAMES[0]} --command \
|
||||
"curl --fail --silent -H 'Metadata-Flavor: Google' \
|
||||
'http://metadata/computeMetadata/v1/instance/attributes/kube-env'" 2>/dev/null
|
||||
}
|
||||
|
||||
# Read os distro information from /os/release on node.
|
||||
# $1: The name of node
|
||||
#
|
||||
# Assumed vars:
|
||||
# PROJECT
|
||||
# ZONE
|
||||
function get-node-os() {
|
||||
gcloud compute ssh "$1" \
|
||||
--project "${PROJECT}" \
|
||||
--zone "${ZONE}" \
|
||||
--command \
|
||||
"cat /etc/os-release | grep \"^ID=.*\" | cut -c 4-"
|
||||
}
|
||||
|
||||
# Assumed vars:
|
||||
# KUBE_VERSION
|
||||
# NODE_SCOPES
|
||||
# NODE_INSTANCE_PREFIX
|
||||
# PROJECT
|
||||
# ZONE
|
||||
#
|
||||
# Vars set:
|
||||
# KUBELET_TOKEN
|
||||
# KUBE_PROXY_TOKEN
|
||||
# CA_CERT_BASE64
|
||||
# EXTRA_DOCKER_OPTS
|
||||
# KUBELET_CERT_BASE64
|
||||
# KUBELET_KEY_BASE64
|
||||
function upgrade-nodes() {
|
||||
prepare-node-upgrade
|
||||
do-node-upgrade
|
||||
}
|
||||
|
||||
function setup-base-image() {
|
||||
if [[ "${env_os_distro}" == "false" ]]; then
|
||||
echo "== Ensuring that new Node base OS image matched the existing Node base OS image"
|
||||
NODE_OS_DISTRIBUTION=$(get-node-os "${NODE_NAMES[0]}")
|
||||
source "${KUBE_ROOT}/cluster/gce/${NODE_OS_DISTRIBUTION}/node-helper.sh"
|
||||
# Reset the node image based on current os distro
|
||||
set-node-image
|
||||
fi
|
||||
}
|
||||
|
||||
# prepare-node-upgrade creates a new instance template suitable for upgrading
|
||||
# to KUBE_VERSION and echos a single line with the name of the new template.
|
||||
#
|
||||
# Assumed vars:
|
||||
# KUBE_VERSION
|
||||
# NODE_SCOPES
|
||||
# NODE_INSTANCE_PREFIX
|
||||
# PROJECT
|
||||
# ZONE
|
||||
#
|
||||
# Vars set:
|
||||
# SANITIZED_VERSION
|
||||
# INSTANCE_GROUPS
|
||||
# KUBELET_TOKEN
|
||||
# KUBE_PROXY_TOKEN
|
||||
# CA_CERT_BASE64
|
||||
# EXTRA_DOCKER_OPTS
|
||||
# KUBELET_CERT_BASE64
|
||||
# KUBELET_KEY_BASE64
|
||||
function prepare-node-upgrade() {
|
||||
echo "== Preparing node upgrade (to ${KUBE_VERSION}). ==" >&2
|
||||
setup-base-image
|
||||
|
||||
SANITIZED_VERSION=$(echo ${KUBE_VERSION} | sed 's/[\.\+]/-/g')
|
||||
|
||||
# TODO(zmerlynn): Refactor setting scope flags.
|
||||
local scope_flags=
|
||||
if [ -n "${NODE_SCOPES}" ]; then
|
||||
scope_flags="--scopes ${NODE_SCOPES}"
|
||||
else
|
||||
scope_flags="--no-scopes"
|
||||
fi
|
||||
|
||||
# Get required node env vars from exiting template.
|
||||
local node_env=$(get-node-env)
|
||||
KUBELET_TOKEN=$(get-env-val "${node_env}" "KUBELET_TOKEN")
|
||||
KUBE_PROXY_TOKEN=$(get-env-val "${node_env}" "KUBE_PROXY_TOKEN")
|
||||
CA_CERT_BASE64=$(get-env-val "${node_env}" "CA_CERT")
|
||||
EXTRA_DOCKER_OPTS=$(get-env-val "${node_env}" "EXTRA_DOCKER_OPTS")
|
||||
KUBELET_CERT_BASE64=$(get-env-val "${node_env}" "KUBELET_CERT")
|
||||
KUBELET_KEY_BASE64=$(get-env-val "${node_env}" "KUBELET_KEY")
|
||||
|
||||
# TODO(zmerlynn): How do we ensure kube-env is written in a ${version}-
|
||||
# compatible way?
|
||||
write-node-env
|
||||
|
||||
# TODO(zmerlynn): Get configure-vm script from ${version}. (Must plumb this
|
||||
# through all create-node-instance-template implementations).
|
||||
local template_name=$(get-template-name-from-version ${SANITIZED_VERSION})
|
||||
create-node-instance-template "${template_name}"
|
||||
# The following is echo'd so that callers can get the template name.
|
||||
echo "Instance template name: ${template_name}"
|
||||
echo "== Finished preparing node upgrade (to ${KUBE_VERSION}). ==" >&2
|
||||
}
|
||||
|
||||
# Prereqs:
|
||||
# - prepare-node-upgrade should have been called successfully
|
||||
function do-node-upgrade() {
|
||||
echo "== Upgrading nodes to ${KUBE_VERSION}. ==" >&2
|
||||
# Do the actual upgrade.
|
||||
# NOTE(zmerlynn): If you are changing this gcloud command, update
|
||||
# test/e2e/cluster_upgrade.go to match this EXACTLY.
|
||||
local template_name=$(get-template-name-from-version ${SANITIZED_VERSION})
|
||||
local old_templates=()
|
||||
local updates=()
|
||||
for group in ${INSTANCE_GROUPS[@]}; do
|
||||
old_templates+=($(gcloud compute instance-groups managed list \
|
||||
--project="${PROJECT}" \
|
||||
--zones="${ZONE}" \
|
||||
--regexp="${group}" \
|
||||
--format='value(instanceTemplate)' || true))
|
||||
echo "== Calling rolling-update for ${group}. ==" >&2
|
||||
update=$(gcloud alpha compute rolling-updates \
|
||||
--project="${PROJECT}" \
|
||||
--zone="${ZONE}" \
|
||||
start \
|
||||
--group="${group}" \
|
||||
--template="${template_name}" \
|
||||
--instance-startup-timeout=300s \
|
||||
--max-num-concurrent-instances=1 \
|
||||
--max-num-failed-instances=0 \
|
||||
--min-instance-update-time=0s 2>&1) && update_rc=$? || update_rc=$?
|
||||
|
||||
if [[ "${update_rc}" != 0 ]]; then
|
||||
echo "== FAILED to start rolling-update: =="
|
||||
echo "${update}"
|
||||
echo " This may be due to a preexisting rolling-update;"
|
||||
echo " see https://github.com/kubernetes/kubernetes/issues/33113 for details."
|
||||
echo " All rolling-updates in project ${PROJECT} zone ${ZONE}:"
|
||||
gcloud alpha compute rolling-updates \
|
||||
--project="${PROJECT}" \
|
||||
--zone="${ZONE}" \
|
||||
list || true
|
||||
return ${update_rc}
|
||||
fi
|
||||
|
||||
id=$(echo "${update}" | grep "Started" | cut -d '/' -f 11 | cut -d ']' -f 1)
|
||||
updates+=("${id}")
|
||||
done
|
||||
|
||||
echo "== Waiting for Upgrading nodes to be finished. ==" >&2
|
||||
# Wait until rolling updates are finished.
|
||||
for update in ${updates[@]}; do
|
||||
while true; do
|
||||
result=$(gcloud alpha compute rolling-updates \
|
||||
--project="${PROJECT}" \
|
||||
--zone="${ZONE}" \
|
||||
describe \
|
||||
${update} \
|
||||
--format='value(status)' || true)
|
||||
if [ $result = "ROLLED_OUT" ]; then
|
||||
echo "Rolling update ${update} is ${result} state and finished."
|
||||
break
|
||||
fi
|
||||
echo "Rolling update ${update} is still in ${result} state."
|
||||
sleep 10
|
||||
done
|
||||
done
|
||||
|
||||
# Remove the old templates.
|
||||
echo "== Deleting old templates in ${PROJECT}. ==" >&2
|
||||
for tmpl in ${old_templates[@]}; do
|
||||
gcloud compute instance-templates delete \
|
||||
--quiet \
|
||||
--project="${PROJECT}" \
|
||||
"${tmpl}" || true
|
||||
done
|
||||
|
||||
echo "== Finished upgrading nodes to ${KUBE_VERSION}. ==" >&2
|
||||
}
|
||||
|
||||
master_upgrade=true
|
||||
node_upgrade=true
|
||||
node_prereqs=false
|
||||
local_binaries=false
|
||||
env_os_distro=false
|
||||
|
||||
while getopts ":MNPlho" opt; do
|
||||
case ${opt} in
|
||||
M)
|
||||
node_upgrade=false
|
||||
;;
|
||||
N)
|
||||
master_upgrade=false
|
||||
;;
|
||||
P)
|
||||
node_prereqs=true
|
||||
;;
|
||||
l)
|
||||
local_binaries=true
|
||||
;;
|
||||
o)
|
||||
env_os_distro=true
|
||||
;;
|
||||
h)
|
||||
usage
|
||||
exit 0
|
||||
;;
|
||||
\?)
|
||||
echo "Invalid option: -$OPTARG" >&2
|
||||
usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [[ $# -gt 1 ]]; then
|
||||
echo "Error: Only one parameter (<version number or publication>) may be passed after the set of flags!" >&2
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -lt 1 ]] && [[ "${local_binaries}" == "false" ]]; then
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "${master_upgrade}" == "false" ]] && [[ "${node_upgrade}" == "false" ]]; then
|
||||
echo "Can't specify both -M and -N" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print-node-version-info "Pre-Upgrade"
|
||||
|
||||
if [[ "${local_binaries}" == "false" ]]; then
|
||||
set_binary_version ${1}
|
||||
fi
|
||||
|
||||
prepare-upgrade
|
||||
|
||||
if [[ "${node_prereqs}" == "true" ]]; then
|
||||
prepare-node-upgrade
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ "${master_upgrade}" == "true" ]]; then
|
||||
upgrade-master
|
||||
fi
|
||||
|
||||
if [[ "${node_upgrade}" == "true" ]]; then
|
||||
if [[ "${local_binaries}" == "true" ]]; then
|
||||
echo "Upgrading nodes to local binaries is not yet supported." >&2
|
||||
exit 1
|
||||
else
|
||||
upgrade-nodes
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "== Validating cluster post-upgrade =="
|
||||
"${KUBE_ROOT}/cluster/validate-cluster.sh"
|
||||
|
||||
print-node-version-info "Post-Upgrade"
|
||||
1910
vendor/k8s.io/kubernetes/cluster/gce/util.sh
generated
vendored
Executable file
1910
vendor/k8s.io/kubernetes/cluster/gce/util.sh
generated
vendored
Executable file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue