Enable Deployments by default

pull/6/head
Janet Kuo 2016-02-02 13:54:03 -08:00
parent 2172e0dea0
commit 2874f30c05
14 changed files with 6081 additions and 2858 deletions

File diff suppressed because it is too large Load Diff

View File

@ -83,7 +83,6 @@ MASTER_RESERVED_IP="${MASTER_RESERVED_IP:-}"
RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
# Enable various v1beta1 features
ENABLE_DEPLOYMENTS="${KUBE_ENABLE_DEPLOYMENTS:-true}"
ENABLE_DAEMONSETS="${KUBE_ENABLE_DAEMONSETS:-true}"
# Optional: Cluster monitoring to setup as part of the cluster bring up:

View File

@ -422,15 +422,6 @@ function yaml-quote {
# Builds the RUNTIME_CONFIG var from other feature enable options
function build-runtime-config() {
if [[ "${ENABLE_DEPLOYMENTS}" == "true" ]]; then
if [[ -z "${RUNTIME_CONFIG}" ]]; then
RUNTIME_CONFIG="extensions/v1beta1/deployments=true"
else
if echo "${RUNTIME_CONFIG}" | grep -q -v "extensions/v1beta1/deployments=true"; then
RUNTIME_CONFIG="${RUNTIME_CONFIG},extensions/v1beta1/deployments=true"
fi
fi
fi
if [[ "${ENABLE_DAEMONSETS}" == "true" ]]; then
if [[ -z "${RUNTIME_CONFIG}" ]]; then
RUNTIME_CONFIG="extensions/v1beta1/daemonsets=true"

View File

@ -51,7 +51,6 @@ RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100}
# Optional: enable v1beta1 related features
ENABLE_DEPLOYMENTS="${KUBE_ENABLE_DEPLOYMENTS:-true}"
ENABLE_DAEMONSETS="${KUBE_ENABLE_DAEMONSETS:-true}"
ENABLE_REPLICASETS="${KUBE_ENABLE_REPLICASETS:-true}"

View File

@ -42,7 +42,6 @@ RUNTIME_CONFIG="${KUBE_RUNTIME_CONFIG:-}"
TERMINATED_POD_GC_THRESHOLD=${TERMINATED_POD_GC_THRESHOLD:-100}
# Optional: enable v1beta1 related features
ENABLE_DEPLOYMENTS="${KUBE_ENABLE_DEPLOYMENTS:-true}"
ENABLE_DAEMONSETS="${KUBE_ENABLE_DAEMONSETS:-true}"
TEST_CLUSTER_LOG_LEVEL="${TEST_CLUSTER_LOG_LEVEL:---v=2}"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -113,10 +113,10 @@ create their own API groups](design/extending-api.md), and to avoid naming colli
## Enabling resources in the extensions group
HorizontalPodAutoscalers, Jobs, Ingress and ReplicaSets are enabled by default.
HorizontalPodAutoscalers, Jobs, Ingress, Deployments and ReplicaSets are enabled by default.
Other extensions resources can be enabled by setting runtime-config on
apiserver. runtime-config accepts comma separated values. For ex: to enable deployments and disable jobs, set
`--runtime-config=extensions/v1beta1/deployments=true,extensions/v1beta1/jobs=false`
apiserver. runtime-config accepts comma separated values. For ex: to disable deployments and jobs, set
`--runtime-config=extensions/v1beta1/deployments=false,extensions/v1beta1/jobs=false`
## v1beta1, v1beta2, and v1beta3 are deprecated; please move to v1 ASAP

View File

@ -70,21 +70,6 @@ A typical use case is:
* Create a Deployment to bring up a replication controller and pods.
* Later, update that Deployment to recreate the pods (for example, to use a new image).
## Enabling Deployments on a Kubernetes cluster
Deployment objects are part of the [`extensions` API Group](../api.md#api-groups) and this feature
is not enabled by default.
Set `--runtime-config=extensions/v1beta1/deployments=true` on the API server to
enable it.
This can be achieved by exporting `KUBE_ENABLE_DEPLOYMENTS=true` before running the
`kube-up.sh` script on GCE.
Note that Deployment objects effectively have [API version
`v1alpha1`](../api.md#api-versioning).
Alpha objects may change or even be discontinued in future software releases.
However, due to to a known issue, they will appear as API version `v1beta1` if
enabled.
## Creating a Deployment
Here is an example Deployment. It creates a replication controller to

View File

@ -178,8 +178,6 @@ func Up() bool {
}
}
// Enable deployments for e2e tests.
os.Setenv("KUBE_ENABLE_DEPLOYMENTS", "true")
return finishRunning("up", exec.Command(path.Join(*root, "hack/e2e-internal/e2e-up.sh")))
}

View File

@ -61,7 +61,6 @@ function configure_upgrade_step() {
if [[ "${KUBERNETES_PROVIDER}" == "gce" ]]; then
KUBE_GCE_INSTANCE_PREFIX="$cluster_name"
NUM_NODES=5
KUBE_ENABLE_DEPLOYMENTS=true
KUBE_ENABLE_DAEMONSETS=true
fi
@ -230,7 +229,6 @@ case ${JOB_NAME} in
: ${GINKGO_TEST_ARGS:="--ginkgo.skip=\[Slow\]|\[Serial\]|\[Disruptive\]|\[Flaky\]|\[Feature:.+\]|\[Skipped\]"}
: ${KUBE_GCE_INSTANCE_PREFIX:="e2e-gce-${NODE_NAME}-${EXECUTOR_NUMBER}"}
: ${PROJECT:="kubernetes-jenkins-pull"}
: ${ENABLE_DEPLOYMENTS:=true}
# Override GCE defaults
NUM_NODES=${NUM_NODES_PARALLEL}
;;
@ -248,7 +246,6 @@ case ${JOB_NAME} in
: ${GINKGO_PARALLEL:="y"}
: ${KUBE_GCE_INSTANCE_PREFIX="e2e-gce"}
: ${PROJECT:="k8s-jkns-e2e-gce"}
: ${ENABLE_DEPLOYMENTS:=true}
: ${FAIL_ON_GCP_RESOURCE_LEAK:="true"}
;;
@ -393,7 +390,6 @@ case ${JOB_NAME} in
: ${GINKGO_PARALLEL:="y"}
: ${KUBE_GCE_INSTANCE_PREFIX="e2e-aws"}
: ${PROJECT:="k8s-jkns-e2e-aws"}
: ${ENABLE_DEPLOYMENTS:=true}
: ${AWS_CONFIG_FILE:='/var/lib/jenkins/.aws/credentials'}
: ${AWS_SSH_KEY:='/var/lib/jenkins/.ssh/kube_aws_rsa'}
: ${KUBE_SSH_USER:='ubuntu'}
@ -439,7 +435,6 @@ case ${JOB_NAME} in
: ${KUBE_GCE_INSTANCE_PREFIX:="e2e-autoscaling"}
: ${PROJECT:="k8s-jnks-e2e-gce-autoscaling"}
: ${FAIL_ON_GCP_RESOURCE_LEAK:="true"}
: ${ENABLE_DEPLOYMENTS:=true}
# Override GCE default for cluster size autoscaling purposes.
ENABLE_CLUSTER_MONITORING="googleinfluxdb"
ADMISSION_CONTROL="NamespaceLifecycle,InitialResources,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota"
@ -798,7 +793,6 @@ case ${JOB_NAME} in
: ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Feature:Upgrade\].*upgrade-master --upgrade-target=${CURRENT_RELEASE_PUBLISHED_VERSION}"}
: ${KUBE_GCE_INSTANCE_PREFIX:="e2e-upgrade-1-0"}
: ${NUM_NODES:=5}
: ${KUBE_ENABLE_DEPLOYMENTS:=true}
: ${KUBE_ENABLE_DAEMONSETS:=true}
;;
@ -831,7 +825,6 @@ case ${JOB_NAME} in
: ${GINKGO_TEST_ARGS:="--ginkgo.focus=\[Feature:Upgrade\].*upgrade-cluster --upgrade-target=${CURRENT_RELEASE_PUBLISHED_VERSION}"}
: ${KUBE_GCE_INSTANCE_PREFIX:="e2e-upgrade-1-0"}
: ${NUM_NODES:=5}
: ${KUBE_ENABLE_DEPLOYMENTS:=true}
: ${KUBE_ENABLE_DAEMONSETS:=true}
;;

View File

@ -188,7 +188,6 @@ KUBE_API_VERSIONS="v1,extensions/v1beta1" "${KUBE_OUTPUT_HOSTBIN}/kube-apiserver
--kubelet-port=${KUBELET_PORT} \
--runtime-config=api/v1 \
--cert-dir="${TMPDIR:-/tmp/}" \
--runtime_config="extensions/v1beta1/deployments=true" \
--service-cluster-ip-range="10.0.0.0/24" 1>&2 &
APISERVER_PID=$!

View File

@ -92,7 +92,6 @@ hack/jenkins/update-jobs.sh: # jenkins_jobs.ini contains administrative credent
hack/jenkins/update-jobs.sh: if [[ -e jenkins_jobs.ini ]]; then
hack/local-up-cluster.sh: runtime_config="--runtime-config=${RUNTIME_CONFIG}"
hack/local-up-cluster.sh: runtime_config=""
hack/test-cmd.sh: --runtime_config="extensions/v1beta1/deployments=true" \
pkg/kubelet/qos/memory_policy_test.go: t.Errorf("oom_score_adj should be between %d and %d, but was %d", test.lowOOMScoreAdj, test.highOOMScoreAdj, oomScoreAdj)
pkg/kubelet/qos/memory_policy_test.go: highOOMScoreAdj int // The min oom_score_adj score the container should be assigned.
pkg/kubelet/qos/memory_policy_test.go: lowOOMScoreAdj int // The max oom_score_adj score the container should be assigned.

View File

@ -574,7 +574,7 @@ func (m *Master) thirdpartyapi(group, kind, version string) *apiserver.APIGroupV
// getExperimentalResources returns the resources for extenstions api
func (m *Master) getExtensionResources(c *Config) map[string]rest.Storage {
// All resources except these are disabled by default.
enabledResources := sets.NewString("horizontalpodautoscalers", "ingresses", "jobs", "replicasets")
enabledResources := sets.NewString("horizontalpodautoscalers", "ingresses", "jobs", "replicasets", "deployments")
resourceOverrides := m.ApiGroupVersionOverrides["extensions/v1beta1"].ResourceOverrides
isEnabled := func(resource string) bool {
// Check if the resource has been overriden.