Last active
February 26, 2019 17:57
-
-
Save jstefek/88c7a5bb028a243e66a66cc681d2dcd3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
name: cluster-autoscaler | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRole | |
metadata: | |
name: cluster-autoscaler | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- events | |
- endpoints | |
verbs: | |
- create | |
- patch | |
- apiGroups: | |
- "" | |
resources: | |
- pods/eviction | |
verbs: | |
- create | |
- apiGroups: | |
- "" | |
resources: | |
- pods/status | |
verbs: | |
- update | |
- apiGroups: | |
- "" | |
resources: | |
- endpoints | |
resourceNames: | |
- cluster-autoscaler | |
verbs: | |
- get | |
- update | |
- apiGroups: | |
- "" | |
resources: | |
- nodes | |
verbs: | |
- watch | |
- list | |
- get | |
- update | |
- apiGroups: | |
- "" | |
resources: | |
- pods | |
- services | |
- replicationcontrollers | |
- persistentvolumeclaims | |
- persistentvolumes | |
verbs: | |
- watch | |
- list | |
- get | |
- apiGroups: | |
- extensions | |
resources: | |
- replicasets | |
- daemonsets | |
verbs: | |
- watch | |
- list | |
- get | |
- apiGroups: | |
- policy | |
resources: | |
- poddisruptionbudgets | |
verbs: | |
- watch | |
- list | |
- apiGroups: | |
- apps | |
resources: | |
- statefulsets | |
verbs: | |
- watch | |
- list | |
- get | |
- apiGroups: | |
- storage.k8s.io | |
resources: | |
- storageclasses | |
verbs: | |
- watch | |
- list | |
- get | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: Role | |
metadata: | |
name: cluster-autoscaler | |
namespace: kube-system | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- configmaps | |
verbs: | |
- create | |
- apiGroups: | |
- "" | |
resources: | |
- configmaps | |
resourceNames: | |
- cluster-autoscaler-status | |
verbs: | |
- delete | |
- get | |
- update | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: cluster-autoscaler | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: cluster-autoscaler | |
subjects: | |
- kind: ServiceAccount | |
name: cluster-autoscaler | |
namespace: kube-system | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: RoleBinding | |
metadata: | |
name: cluster-autoscaler | |
namespace: kube-system | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: cluster-autoscaler | |
subjects: | |
- kind: ServiceAccount | |
name: cluster-autoscaler | |
namespace: kube-system | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: cluster-autoscaler | |
namespace: kube-system | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: cluster-autoscaler | |
template: | |
metadata: | |
labels: | |
k8s-addon: cluster-autoscaler.addons.k8s.io | |
app: cluster-autoscaler | |
annotations: | |
# For 1.6, we keep the old tolerations in case of a downgrade to 1.5 | |
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"dedicated", "value":"master"}]' | |
prometheus.io/scrape: 'true' | |
prometheus.io/port: '8085' | |
spec: | |
tolerations: | |
- effect: NoSchedule | |
key: node-role.kubernetes.io/master | |
nodeSelector: | |
kubernetes.io/role: master | |
serviceAccountName: cluster-autoscaler | |
containers: | |
- name: cluster-autoscaler | |
image: k8s.gcr.io/cluster-autoscaler:v1.1.0 | |
livenessProbe: | |
httpGet: | |
path: /health-check | |
port: 8085 | |
readinessProbe: | |
httpGet: | |
path: /health-check | |
port: 8085 | |
resources: | |
limits: | |
cpu: 100m | |
memory: 300Mi | |
requests: | |
cpu: 100m | |
memory: 300Mi | |
command: | |
- ./cluster-autoscaler | |
- --v=4 | |
- --stderrthreshold=info | |
- --cloud-provider=aws | |
- --skip-nodes-with-local-storage=false | |
- --nodes=4:120:nodes.dev.archon.bbcollabsandbox.com | |
- --scale-down-utilization-threshold={{SCALE_DOWN_UTILIZATION_THRESHOLD}} | |
- --scale-down-delay-after-add={{SCALE_DOWN_DELAY_AFTER_ADD}} | |
- --scale-down-unneeded-time={{SCALE_DOWN_UNNEEDED_TIME}} | |
env: | |
- name: AWS_REGION | |
value: us-east-1 | |
volumeMounts: | |
- name: ssl-certs | |
mountPath: /etc/ssl/certs/ca-bundle.crt | |
readOnly: true | |
volumes: | |
- name: ssl-certs | |
hostPath: | |
path: /etc/ssl/certs/ca-bundle.crt | |
dnsPolicy: "Default" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment