Skip to content
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

fix(argo-rollouts): Align permissions for controller's ClusterRole / Role #2830

Merged
merged 3 commits into from
Aug 12, 2024

Conversation

yu-croco
Copy link
Collaborator

@yu-croco yu-croco commented Jul 13, 2024

The permissions for controller's clusterrole and role are supposed to be same, but there is an unintended diff. So I merged the permissions into a single definition for DRY.

Checklist:

  • I have bumped the chart version according to versioning
  • I have updated the documentation according to documentation
  • I have updated the chart changelog with all the changes that come with this pull request according to changelog.
  • Any new values are backwards compatible and/or have sensible default.
  • I have signed off all my commits as required by DCO.
  • My build is green (troubleshooting builds).

- update
{{- end }}
{{- end }}
{{- include "argo-rollouts.controller.roleRuls" . | nindent 2 }}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clusterrole has {{- with .Values.providerRBAC.additionalRules }} block and Role doesn't have it, so I thought it's better to merge into a single definition.

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- include "argo-rollouts.controller.roleRuls" . | nindent 2 }}
{{- include "argo-rollouts.controller.roleRules" . | nindent 2 }}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reviewing. Fixed in eba2e52 😇

…Role

Signed-off-by: yu-croco <yu.croco@gmail.com>
@yu-croco yu-croco marked this pull request as ready for review July 13, 2024 11:34
@yu-croco yu-croco requested a review from jmeridth as a code owner July 13, 2024 11:34
Copy link
Member

@mkilchhofer mkilchhofer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost LGTM. Found a little typo

{{ toYaml . }}
{{- end }}
{{- end }}
{{- include "argo-rollouts.controller.roleRuls" . | nindent 2 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- include "argo-rollouts.controller.roleRuls" . | nindent 2 }}
{{- include "argo-rollouts.controller.roleRules" . | nindent 2 }}

{{/*
Return the rules for controller's Role and ClusterRole
*/}}
{{- define "argo-rollouts.controller.roleRuls" -}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- define "argo-rollouts.controller.roleRuls" -}}
{{- define "argo-rollouts.controller.roleRules" -}}

- update
{{- end }}
{{- end }}
{{- include "argo-rollouts.controller.roleRuls" . | nindent 2 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{- include "argo-rollouts.controller.roleRuls" . | nindent 2 }}
{{- include "argo-rollouts.controller.roleRules" . | nindent 2 }}

Signed-off-by: yu-croco <yu.croco@gmail.com>
@mkilchhofer mkilchhofer merged commit 4f4fb95 into argoproj:main Aug 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants