Skip to content

Commit

Permalink
Enable Deployments by default
Browse files Browse the repository at this point in the history
  • Loading branch information
janetkuo committed Feb 12, 2016
1 parent 2172e0d commit 2874f30
Show file tree
Hide file tree
Showing 14 changed files with 5,714 additions and 2,491 deletions.
4,055 changes: 2,566 additions & 1,489 deletions api/swagger-spec/extensions_v1beta1.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion cluster/aws/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 0 additions & 9 deletions cluster/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion cluster/gce/config-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
1 change: 0 additions & 1 deletion cluster/kubemark/config-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
1,027 changes: 733 additions & 294 deletions docs/api-reference/extensions/v1beta1/definitions.html

Large diffs are not rendered by default.

3,077 changes: 2,411 additions & 666 deletions docs/api-reference/extensions/v1beta1/operations.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 0 additions & 15 deletions docs/user-guide/deployments.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions hack/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")))
}

Expand Down
7 changes: 0 additions & 7 deletions hack/jenkins/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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}
;;
Expand All @@ -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"}
;;

Expand Down Expand Up @@ -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'}
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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}
;;

Expand Down Expand Up @@ -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}
;;

Expand Down
1 change: 0 additions & 1 deletion hack/test-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$!

Expand Down
1 change: 0 additions & 1 deletion hack/verify-flags/exceptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/master/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2874f30

Please sign in to comment.