-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Action Platform PAR] Use actionsAllowlist to configure RBAC #1518
base: main
Are you sure you want to change the base?
[Action Platform PAR] Use actionsAllowlist to configure RBAC #1518
Conversation
{{/* | ||
Defines an RBAC "get" rule for provided apiGroup and resource type | ||
*/}} | ||
{{- define "rbacGetRule" }} | ||
{{- include "rbacRule" (dict "apiGroup" .apiGroup "resource" .resource "verbs" (list "get"))}} | ||
{{- end }} | ||
|
||
{{/* | ||
Defines an RBAC "list" rule for provided apiGroup and resource type | ||
*/}} | ||
{{- define "rbacListRule" }} | ||
{{- include "rbacRule" (dict "apiGroup" .apiGroup "resource" .resource "verbs" (list "list"))}} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends how much granularity you want, but maybe get and list can be define together. Same for patch and update
{{- include "rbacPatchRule" (dict "apiGroup" "apps" "resource" "deployments")}} | ||
{{- end }} | ||
{{- if has "com.datadoghq.kubernetes.apps.restartDeployment" $runner.config.actionsAllowlist }} | ||
{{- include "rbacUpdateRule" (dict "apiGroup" "apps" "resource" "deployments")}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
restartDeployment is actually using patch under the hood
@@ -1,5 +1,9 @@ | |||
# Datadog changelog | |||
|
|||
### 0.9.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you merge / rebase from main ? there was another release in the meantime
What this PR does / why we need it:
Simplified user configuration for Private Action Runner RBAC in
ClusterRole
that uses the following:kubernetesPermissions
actionsAllowList
.How to test:
com.datadoghq.kubernetes.apps.updateDeployment
inactionsAllowlist
helm template ./
Expected ClusterRole:
Note that this is implementation is currently limited to the following actions from
actionsAllowlist
:getDeployment
listDeployment
patchDeployment
restartDeployment
Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
.github/helm-docs.sh
)CHANGELOG.md
has been updatedREADME.md
make update-test-baselines
)