-
Notifications
You must be signed in to change notification settings - Fork 1.8k
pkg/helm/run.go,pkg/internal/scaffold: helm operator metrics #1482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
204c89c
21cce0a
c0597b1
2845681
e2b90b9
2c33c2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,6 @@ type Role struct { | |
|
||
IsClusterScoped bool | ||
SkipDefaultRules bool | ||
SkipMetricsRules bool | ||
CustomRules []rbacv1.PolicyRule | ||
} | ||
|
||
|
@@ -213,7 +212,6 @@ rules: | |
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if not .SkipMetricsRules }} | ||
- apiGroups: | ||
- monitoring.coreos.com | ||
resources: | ||
|
@@ -229,5 +227,16 @@ rules: | |
- {{ .ProjectName }} | ||
verbs: | ||
- "update" | ||
{{- end }} | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- pods | ||
verbs: | ||
- get | ||
- apiGroups: | ||
- apps | ||
resources: | ||
- replicasets | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is necessary for code that moves up the owner reference chain from the pod to figure out which resource to use for the metrics service owner reference. Since our default operator workload kind is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We already have pods and replicasets listed with the verb - apiGroups:
- ""
resources:
- pods
...
verbs:
- "*"
- apiGroups:
- apps
resources:
- deployments
- daemonsets
- replicasets
- statefulsets
verbs:
- "*" Those are the general default rules and these ones are specific to allowing metrics to be exposed. Do you think it's worth adding a comment in the scaffold so it's obvious to the user why we've repeated the rules for pods and replicasets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This would be nice. Lili asked this same question when we introduced the initial helm role generation. I looked into it and it turns out it isn't straigtforward since we unmarshal and remarshal the YAML (thus losing the comments) to update the role for CRD APIs. |
||
verbs: | ||
- get | ||
` |
Uh oh!
There was an error while loading. Please reload this page.