Skip to content

Commit

Permalink
Merge pull request #60 from kitianFresh/bugfix/external-metric-apiser…
Browse files Browse the repository at this point in the history
…vice-rbac

add rbac and apiservice for external metrics
  • Loading branch information
qmhu authored May 27, 2022
2 parents 38a9c05 + 22cd4c1 commit b8b3f05
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 35 deletions.
17 changes: 16 additions & 1 deletion charts/crane/templates/metrics-apiservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,19 @@ spec:
version: v1beta2
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 200
versionPriority: 200

---
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: v1beta1.external.metrics.k8s.io
spec:
service:
name: metric-adapter
namespace: crane-system
group: external.metrics.k8s.io
version: v1beta1
insecureSkipTLSVerify: true
groupPriorityMinimum: 100
versionPriority: 100
37 changes: 3 additions & 34 deletions charts/crane/templates/metrics-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,9 @@ metadata:
labels:
{{- include "crane.labels" . | nindent 4 }}
rules:
- apiGroups:
- "prediction.crane.io"
resources:
- '*'
verbs:
- '*'
- apiGroups:
- "autoscaling.crane.io"
resources:
- '*'
verbs:
- '*'
- apiGroups:
- ""
resources:
- 'configmaps'
verbs:
- '*'
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- patch
- update
- watch
- apiGroups:
- "custom.metrics.k8s.io"
resources:
- '*'
verbs:
- '*'
- apiGroups: [ '*' ]
resources: [ '*' ]
verbs: [ "*" ]
---

apiVersion: rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit b8b3f05

Please sign in to comment.