update cluster-autoscaler addon to match upstream example
apiVersion: v1
kind: ServiceAccount
metadata:
+ labels:
+ k8s-addon: cluster-autoscaler.addons.k8s.io
+ k8s-app: cluster-autoscaler
name: cluster-autoscaler
namespace: kube-system
---
@@ -9,6 +12,9 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cluster-autoscaler
+ labels:
+ k8s-addon: cluster-autoscaler.addons.k8s.io
+ k8s-app: cluster-autoscaler
rules:
- apiGroups: [""]
resources: ["events", "endpoints"]
@@ -28,6 +34,7 @@ rules:
verbs: ["watch", "list", "get", "update"]
- apiGroups: [""]
resources:
+ - "namespaces"
- "pods"
- "services"
- "replicationcontrollers"
@@ -44,7 +51,7 @@ rules:
resources: ["statefulsets", "replicasets", "daemonsets"]
verbs: ["watch", "list", "get"]
- apiGroups: ["storage.k8s.io"]
- resources: ["storageclasses", "csinodes"]
+ resources: ["storageclasses", "csinodes", "csistoragecapacities", "csidrivers"]
verbs: ["watch", "list", "get"]
- apiGroups: ["batch", "extensions"]
resources: ["jobs"]
@@ -62,6 +69,9 @@ kind: Role
metadata:
name: cluster-autoscaler
namespace: kube-system
+ labels:
+ k8s-addon: cluster-autoscaler.addons.k8s.io
+ k8s-app: cluster-autoscaler
rules:
- apiGroups: [""]
resources: ["configmaps"]
@@ -75,6 +85,9 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-autoscaler-management
+ labels:
+ k8s-addon: cluster-autoscaler.addons.k8s.io
+ k8s-app: cluster-autoscaler
rules:
- apiGroups:
- cluster.k8s.io
@@ -93,6 +106,9 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-autoscaler
+ labels:
+ k8s-addon: cluster-autoscaler.addons.k8s.io
+ k8s-app: cluster-autoscaler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -107,6 +123,9 @@ kind: RoleBinding
metadata:
name: cluster-autoscaler
namespace: kube-system
+ labels:
+ k8s-addon: cluster-autoscaler.addons.k8s.io
+ k8s-app: cluster-autoscaler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
@@ -120,6 +139,9 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-autoscaler-management
+ labels:
+ k8s-addon: cluster-autoscaler.addons.k8s.io
+ k8s-app: cluster-autoscaler
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -145,6 +167,9 @@ spec:
metadata:
labels:
app: cluster-autoscaler
+ annotations:
+ prometheus.io/scrape: 'true'
+ prometheus.io/port: '8085'
spec:
containers:
- image: {{ default (.InternalImages.Get "ClusterAutoscaler") .Params.CLUSTER_AUTOSCALER_IMAGE }}
