Skip to content

Commit

Permalink
Fixup autoscaler and metrics for api.ci
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed May 27, 2018
1 parent 2350680 commit 7372a51
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 5 deletions.
16 changes: 16 additions & 0 deletions cluster/ci/config/cluster-autoscaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ items:
- get
- list
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- update
- patch
- apiGroups:
- extensions
- apps
Expand All @@ -56,6 +64,14 @@ items:
- get
- list
- watch
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- watch
- apiGroups:
- policy
resources:
Expand Down
56 changes: 51 additions & 5 deletions cluster/ci/config/metrics-server.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
kind: List
apiVersion: v1
items:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: metrics-server
namespace: kube-system
- apiVersion: v1
kind: Service
metadata:
Expand Down Expand Up @@ -35,13 +40,15 @@ items:
app: metrics-server
spec:
containers:
- args:
- command:
- /usr/bin/metrics-server
args:
- --v=6
- --tls-private-key-file=/etc/tls/tls.key
- --tls-cert-file=/etc/tls/tls.crt
- --source=kubernetes.summary_api:?kubeletPort=10250&kubeletHttps=1
- --secure-port=8443
image: docker-registry.default.svc:5000/ci/kubernetes-metrics:latest
image: docker-registry.default.svc:5000/openshift/origin-v3.10:metrics-server
imagePullPolicy: IfNotPresent
name: metrics-server
volumeMounts:
Expand All @@ -58,6 +65,7 @@ items:
kind: Role
metadata:
name: metrics-server
namespace: kube-system
rules:
- apiGroups:
- ""
Expand All @@ -66,8 +74,6 @@ items:
resourceNames:
- extension-apiserver-authentication
verbs:
- update
- patch
- get
- apiGroups:
- ""
Expand All @@ -81,4 +87,44 @@ items:
- events
verbs:
- create
# oc policy add-role-to-user metrics-server -z metrics-server -n kube-system
- apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: metrics-server
namespace: kube-system
subjects:
- kind: ServiceAccount
apiGroup: ""
name: metrics-server
namespace: kube-system
roleRef:
kind: Role
apiGroup: rbac.authorization.k8s.io
name: metrics-server
namespace: kube-system
- apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: metrics-server
subjects:
- kind: ServiceAccount
apiGroup: ""
name: metrics-server
namespace: kube-system
roleRef:
kind: ClusterRole
apiGroup: rbac.authorization.k8s.io
name: cluster-reader
- apiVersion: apiregistration.k8s.io/v1beta1
kind: APIService
metadata:
name: v1beta1.metrics.k8s.io
spec:
service:
name: metrics-server
namespace: kube-system
group: metrics.k8s.io
version: v1beta1
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 100

0 comments on commit 7372a51

Please sign in to comment.