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

[BUG] Helm Chart clusterrole invalid if PSP and rbac are both enabled #325

Closed
mitchellmaler opened this issue Aug 14, 2020 · 1 comment · Fixed by #356
Closed

[BUG] Helm Chart clusterrole invalid if PSP and rbac are both enabled #325

mitchellmaler opened this issue Aug 14, 2020 · 1 comment · Fixed by #356
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest

Comments

@mitchellmaler
Copy link

mitchellmaler commented Aug 14, 2020

Describe the bug
If both RBAC and PSP are enabled the two rules added to the clusterrole are not indented the same.
https://github.com/infracloudio/botkube/blob/develop/helm/botkube/templates/clusterrole.yaml#L11

To Reproduce
Steps to reproduce the behavior:
Install chart (or template) with both rbac and psp enabled.

Expected behavior
Cluster role is set correctly.

Screenshots

---
# Source: botkube/templates/clusterrole.yaml

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: botkube-clusterrole
  labels:
    app.kubernetes.io/name: botkube
    helm.sh/chart: botkube-v0.10.0
    app.kubernetes.io/instance: botkube
    app.kubernetes.io/managed-by: Helm
rules:
    - apiGroups:
      - '*'
      resources:
      - '*'
      verbs:
      - get
      - watch
      - list
  - apiGroups: ["extensions"]
    resourceNames: ["botkube-psp"]
    resources: ["podsecuritypolicies"]
    verbs: ["use"]

Additional context
Add any other context about the problem here.

@mitchellmaler mitchellmaler added the bug Something isn't working label Aug 14, 2020
@mitchellmaler mitchellmaler changed the title [BUG] Helm Chart clusterrole invalid if PSP enabled [BUG] Helm Chart clusterrole invalid if PSP and rbac are both enabled Aug 14, 2020
@PrasadG193
Copy link
Collaborator

Looks like we are using different indentation for rules. Should be easy to fix to have common indentation spacing.

@mergify mergify bot closed this as completed in #356 Nov 2, 2020
mergify bot pushed a commit that referenced this issue Nov 2, 2020
##### ISSUE TYPE
<!--- Pick one below and delete the rest: -->
 - Bug fix Pull Request

##### SUMMARY
<!--- Describe the change, including rationale and design decisions -->

Correctly indent RBAC rules. It was previously throwing an error when enabling both psp and rbac at the value level. 

<!---
If you are fixing an existing issue, please include "Fixes #nnn" in your
PR comment; and describe briefly what the change does.
-->



<!--- Please list dependencies added with your change also -->

Fixes #325
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants