mirror of https://github.com/kubernetes/kops.git
236 lines
4.4 KiB
YAML
236 lines
4.4 KiB
YAML
---
|
|
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: {{IMAGE}}
|
|
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={{CLOUD_PROVIDER}}
|
|
- --skip-nodes-with-local-storage=false
|
|
- --nodes={{MIN_NODES}}:{{MAX_NODES}}:{{GROUP_NAME}}
|
|
env:
|
|
- name: AWS_REGION
|
|
value: {{AWS_REGION}}
|
|
volumeMounts:
|
|
- name: ssl-certs
|
|
mountPath: {{SSL_CERT_PATH}}
|
|
readOnly: true
|
|
volumes:
|
|
- name: ssl-certs
|
|
hostPath:
|
|
path: {{SSL_CERT_PATH}}
|
|
dnsPolicy: "Default"
|