Skip to content

Commit

Permalink
merge upstream/cluster-autoscaler-release-1.14
Browse files Browse the repository at this point in the history
frobware committed Jun 20, 2019
2 parents 2b9e732 + d09c20d commit 8a99988
Showing 3,375 changed files with 439,962 additions and 372,473 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -25,4 +25,3 @@
Session.vim
.netrwhist

_output
136 changes: 0 additions & 136 deletions Makefile

This file was deleted.

15 changes: 6 additions & 9 deletions OWNERS
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# See the OWNERS docs: https://git.k8s.io/community/contributors/guide/owners.md

approvers:
- enxebre
- frobware
- ingvagabund
- bison
- mwielgus
- maciekpytel
- bskiba
reviewers:
- paulfantom
- spangenberg
- vikaschoudhary16
- mwielgus
- maciekpytel
- bskiba
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ This repository contains autoscaling-related components for Kubernetes.
Cluster so that all pods have a place to run and there are no unneeded nodes. Works with GCP, AWS and Azure. Version 1.0 (GA) was released with kubernetes 1.8.

[Vertical Pod Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler) - a set of components that automatically adjust the
amount of CPU and memory requested by pods running in the Kubernetes Cluster. Current state - alpha.
amount of CPU and memory requested by pods running in the Kubernetes Cluster. Current state - beta.

[Addon Resizer](https://github.com/kubernetes/autoscaler/tree/master/addon-resizer) - a simplified version of vertical pod autoscaler that modifies
resource requests of a deployment based on the number of nodes in the Kubernetes Cluster. Current state - beta.
@@ -24,6 +24,10 @@ of our weekly meetings. See [the Kubernetes Community Repo](https://github.com/

## Getting the Code

Fork the repository in the cloud:
1. Visit https://github.com/kubernetes/autoscaler
1. Click Fork button (top right) to establish a cloud-based fork.

The code must be checked out as a subdirectory of `k8s.io`, and not `github.com`.

```shell
@@ -34,5 +38,8 @@ git clone https://github.com/$YOUR_GITHUB_USERNAME/autoscaler.git
cd autoscaler
```

Please refer to Kubernetes [Github workflow guide] for more details.

[GoDoc]: https://godoc.org/k8s.io/autoscaler
[GoDoc Widget]: https://godoc.org/k8s.io/autoscaler?status.svg
[Github workflow guide]: https://github.com/kubernetes/community/blob/master/contributors/guide/github-workflow.md
15 changes: 15 additions & 0 deletions SECURITY_CONTACTS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Defined below are the security contacts for this repo.
#
# They are the contact point for the Product Security Committee to reach out
# to for triaging and handling of incoming issues.
#
# The below names agree to abide by the
# [Embargo Policy](https://git.k8s.io/security/private-distributors-list.md#embargo-policy)
# and will be removed and replaced if they violate that agreement.
#
# DO NOT REPORT SECURITY VULNERABILITIES DIRECTLY TO THESE NAMES, FOLLOW THE
# INSTRUCTIONS AT https://kubernetes.io/security/

bskiba
maciekpytel
mwielgus
8 changes: 2 additions & 6 deletions addon-resizer/OWNERS
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
approvers:
- piosz
- bskiba
- wojtek-t
- kawych
- x13n
reviewers:
- piosz
- bskiba
- wojtek-t
- kawych
- x13n
24 changes: 18 additions & 6 deletions addon-resizer/README.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,11 @@ vertically scales the dependent container up and down. Currently the only
option is to scale it linearly based on the number of nodes, and it only works
for a singleton.

Currently recommended version is 1.8, on addon-resizer-release-1.8 branch.
Currently recommended version is 1.8, on addon-resizer-release-1.8 branch. The latest version and Docker images are 2.1 pushed to:

* gcr.io/google-containers/addon-resizer-amd64:2.1
* gcr.io/google-containers/addon-resizer-arm64:2.1
* gcr.io/google-containers/addon-resizer-arm:2.1

## Nanny program and arguments

@@ -14,20 +18,28 @@ The nanny scales resources linearly with the number of nodes in the cluster. The
The cluster size is periodically checked, and used to calculate the expected resources. If the expected and actual resources differ by more than the threshold (given as a +/- percent), then the deployment is updated (updating a deployment stops the old pod, and starts a new pod).

```
Usage of pod_nanny:
Usage of ./pod_nanny:
--acceptance-offset=20: A number from range 0-100. The dependent's resources are rewritten when they deviate from expected by a percentage that is higher than this threshold. Can't be lower than recommendation-offset.
--alsologtostderr[=false]: log to standard error as well as files
--container="pod-nanny": The name of the container to watch. This defaults to the nanny itself.
--cpu="MISSING": The base CPU resource requirement.
--deployment="": The name of the deployment being monitored. This is required.
--extra-cpu="0": The amount of CPU to add per node.
--extra-memory="0Mi": The amount of memory to add per node.
--extra-storage="0Gi": The amount of storage to add per node.
--log-flush-frequency=5s: Maximum number of seconds between log flushes
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir="": If non-empty, write log files in this directory
--logtostderr[=true]: log to standard error instead of files
--memory="MISSING": The base memory resource requirement.
--namespace=$MY_POD_NAMESPACE: The namespace of the ward. This defaults to the nanny pod's own namespace.
--pod=$MY_POD_NAME: The name of the pod to watch. This defaults to the nanny's own pod.
--namespace="": The namespace of the ward. This defaults to the nanny pod's own namespace.
--pod="": The name of the pod to watch. This defaults to the nanny's own pod.
--poll-period=10000: The time, in milliseconds, to poll the dependent container.
--recommendation-offset=10: A number from range 0-100. When the dependent's resources are rewritten, they are set to the closer end of the range defined by this percentage threshold.
--stderrthreshold=2: logs at or above this threshold go to stderr
--storage="MISSING": The base storage resource requirement.
--threshold=0: A number between 0-100. The dependent's resources are rewritten when they deviate from expected by more than threshold.
--v=0: log level for V logs
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
```

## Example deployment file
@@ -70,7 +82,7 @@ spec:
kubernetes.io/cluster-service: "true"
spec:
containers:
- image: staging-k8s.gcr.io/addon-resizer:1.8.1
- image: gcr.io/google-containers/addon-resizer-amd64:2.1
imagePullPolicy: Always
name: pod-nanny
resources:
4 changes: 2 additions & 2 deletions addon-resizer/nanny/kubernetes_client.go
Original file line number Diff line number Diff line change
@@ -63,7 +63,7 @@ func (k *kubernetesClient) ContainerResources() (*apiv1.ResourceRequirements, er
return &container.Resources, nil
}
}
return nil, fmt.Errorf("Container %s was not found in deployment %s in namespace %s.", k.container, k.deployment, k.namespace)
return nil, fmt.Errorf("container %s was not found in deployment %s in namespace %s.", k.container, k.deployment, k.namespace)
}

func (k *kubernetesClient) UpdateDeployment(resources *apiv1.ResourceRequirements) error {
@@ -83,7 +83,7 @@ func (k *kubernetesClient) UpdateDeployment(resources *apiv1.ResourceRequirement
}
}

return fmt.Errorf("Container %s was not found in the deployment %s in namespace %s.", k.container, k.deployment, k.namespace)
return fmt.Errorf("container %s was not found in the deployment %s in namespace %s.", k.container, k.deployment, k.namespace)
}

// NewKubernetesClient gives a KubernetesClient with the given dependencies.
2 changes: 0 additions & 2 deletions addon-resizer/nanny/main/pod_nanny.go
Original file line number Diff line number Diff line change
@@ -59,8 +59,6 @@ func checkPercentageFlagBounds(flagName string, flagValue int) {
}

func main() {
// First log our starting config, and then set up.
log.Infof("Invoked by %v", os.Args)
// Add standard go flags to the flag set, to enable e.g. setting glog flags.
flag.CommandLine.AddGoFlagSet(goflag.CommandLine)
flag.Parse()
10 changes: 10 additions & 0 deletions builder/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
approvers:
- aleksandra-malinowska
- losipiuk
- maciekpytel
- mwielgus
reviewers:
- aleksandra-malinowska
- losipiuk
- maciekpytel
- mwielgus
Loading

0 comments on commit 8a99988

Please sign in to comment.